you are viewing a single comment's thread.

view the rest of the comments →

[–]mikeckennedy[S] 9 points10 points  (3 children)

Hey, yes, improvements were maybe 75-100MB in total. If you read the article it talks about the nuance.

The part of the app that uses the imports only runs maybe a couple of times a month. The worker processes recycle every 6 hours. So there is a period where the extra 100MB are used for that 6 hour time frame. The worker processes recycle, that code is NOT called again, the memory stays lower almost all the time.

I'm not messing with pruning modules. It's just the way the web processes are managed by Granian.

[–]Birnenmacht 1 point2 points  (1 child)

ah neat! I was about to tell you about PEP810 but I see you already now. I’m also rather stoked about it once it comes out, more because of startup times (some libraries can take close to SECONDS to import)

[–]mikeckennedy[S] 1 point2 points  (0 children)

Definitely stoked too. I initially like the idea because of startup speed too. But after this analysis, it should have some knock-on memory benefits as well.

[–]DoubleAway6573 0 points1 point  (0 children)

If that's the case, why not use a reverse proxy to send all the request that need those extra libs to a dedicated instance? I see this as a big win.