In my experience, there are two things which are the main startup bottlenecks.
The first is that evalSandboxed (in boot.js) runs every module in a new context. If you change it to all of them using one separate context which you create outside the function, it should speed things up some. This one may vary between node versions, but it's worth a shot. The second is loading the hundreds of tiddlers that make up the core. There is a feature of the boot process that fixes this. Replace the contents of the core folder with this file (assuming your using Tiddlywiki5.1.21) https://github.com/Arlen22/TiddlyWiki5-production/blob/master/5-1-21/core/plugin.info. That way it's just loading one file and doing a simple JSON.parse. That's the main ones I've found. Arlen On Fri, Dec 6, 2019 at 8:32 AM Florian Cauvin <[email protected]> wrote: > Hi Jeremy, > I have a few hundreds tiddlers, but I don't think that's a huge amount of > content. > > Starting time is not a show stopper (as once it's up and running, > TiddlyWiki server performs very well), but it is definitely an annoyance > which introduce friction in my workflow because I maintain many personal > wikis and serve one wiki at a time (when I want to browse or edit it). Thus > I often stop and then start Node.js to switch the current wiki I'm working > with. In this case, it'd be very useful if it would load fast (which I > guess should be possible as TW shouldn't need to deeply process all > tiddlers' content just to start up). > > Cheers! > > On Friday, December 6, 2019 at 1:50:54 PM UTC+2, Jeremy Ruston wrote: >> >> Hi Florian >> >> Do you have a large number of tiddlers in your wiki? >> >> The startup time under Node.js hasn’t had much optimisation attention, >> and I think there’s quite a lot of scope to improve things. >> >> Best wishes >> >> Jeremy. >> >> On 6 Dec 2019, at 11:33, Florian Cauvin <[email protected]> wrote: >> >> On my RaspberryPi 3 with Raspian and NodeJs: >> >> $ time tiddlywiki --version >> 5.1.21 >> >> real 1m2,309s >> user 1m2,727s >> sys 0m0,511s >> >> >> Once TiddlyWiki is "loaded" it works well and is responsive.... but >1 >> minute to start up? Is that normal??? >> >> -- >> You received this message because you are subscribed to the Google Groups >> "TiddlyWiki" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/tiddlywiki/34128edc-f5b0-4154-9077-2d38e79d1eee%40googlegroups.com >> <https://groups.google.com/d/msgid/tiddlywiki/34128edc-f5b0-4154-9077-2d38e79d1eee%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> >> -- > You received this message because you are subscribed to the Google Groups > "TiddlyWiki" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/tiddlywiki/6513caf7-b1a4-4290-8abb-4718c3c9e292%40googlegroups.com > <https://groups.google.com/d/msgid/tiddlywiki/6513caf7-b1a4-4290-8abb-4718c3c9e292%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/CAJ1vdSSeYHuJaKneM4Z569Xeod82M%3D_6EEF%3D0w5LK1PBF6OoKA%40mail.gmail.com.

