in reply to When does it make sense to preload modules when starting Starman?
IMO it makes sense to preload modules if these modules take a long time to initialize and you have a good chance of sharing their data among the forked copies.
Examples I can think of are caching some (largish) resources in memory, or modules that autogenerate lots of code.
Database connections sound interesting, but usually, DBI database handles need to be reinitialized after a fork() call, so that won't work.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: When does it make sense to preload modules when starting Starman?
by karlgoethebier (Abbot) on Oct 28, 2021 at 11:08 UTC | |
by LanX (Saint) on Oct 28, 2021 at 11:29 UTC | |
by karlgoethebier (Abbot) on Oct 28, 2021 at 13:56 UTC | |
by LanX (Saint) on Oct 28, 2021 at 13:59 UTC | |
by karlgoethebier (Abbot) on Oct 28, 2021 at 19:00 UTC | |
by perlfan (Parson) on Oct 29, 2021 at 08:39 UTC | |
by karlgoethebier (Abbot) on Oct 30, 2021 at 07:45 UTC |