I've noticed that when opening up a TW file in a browser, it takes a lot 
more memory (10x) than the original TW file. I suspect that there is a lot 
of stuff that has to be "unpacked" into memory. By extension, the same 
thing probably happens inside of a node running tw.

On Friday, December 20, 2019 at 12:28:10 PM UTC-8, Enrico Guiraud wrote:
>
> Hi Jeremy,
> tiddlywiki uses 110MB of RAM to serve an *empty *tiddlywiki.
>
> The total size of all wikis that I need to serve is currently less than 
> 15MB. I'm perfectly ok with all tiddlers being loaded in memory.
> What I find weird is that every server I spin up has an overhead of 110+ 
> MB, and I'm looking into ways to reduce that.
>
> Cheers,
> Enrico
>
> On Fri, 20 Dec 2019 at 21:19, Jeremy Ruston <[email protected]> 
> wrote:
>
>> Hi Enrico
>>
>> TiddlyWiki under Node.js loads the entire wiki into RAM. It does so in 
>> order to support server-side processing (such as serverside page 
>> rendering). But, of course, it is relatively resource intensive, and 
>> unnecessary if all the server is doing is acting as a front end to a 
>> database of tiddlers, and the browser is doing all the rendering.
>>
>> Arlen Beiler recently did some exploration along these lines recently:
>>
>>
>> https://groups.google.com/d/msgid/tiddlywiki/CAJ1vdSSe4-y4wR%3D6o_ihBmYe8E_bUqAgqT0tpb7LwaSpv7K9Uw%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/tiddlywiki/CAJ1vdSSe4-y4wR%3D6o_ihBmYe8E_bUqAgqT0tpb7LwaSpv7K9Uw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>
>> Best wishes
>>
>> Jeremy
>>
>>
>> --
>> Jeremy Ruston
>> [email protected]
>> https://jermolene.com
>>
>> On 20 Dec 2019, at 15:59, Enrico Guiraud <[email protected]> 
>> wrote:
>>
>> 
>> Hi all,
>> big fan of tiddlywiki (I routinely use 3, hosted on a VPS) and recently I 
>> started advertising it to my friends.
>> To get more people into tiddlywiki, I just set them up for them on my VPS.
>>
>> The problem: I'm now serving an average of 5-6 tiddlywikis, and my little 
>> VPS is almost out of RAM: each tiddlywiki server uses 110 MB or more. 
>> That's _a lot_, isn't it?
>>
>> Can anyone suggest ways to reduce memory usage when serving multiple 
>> tiddlywikis?
>>
>> Would it be possible to have one server serve different wikis on 
>> different paths (and if so, would it help)?
>>
>>
>> Does anyone know what causes the large memory usage and whether it can be 
>> optimized? I would be willing to put some hours into this -- am a 
>> developer, but don't know much about javascript.
>>
>>
>> Cheers,
>>
>> Enrico
>>
>> -- 
>> 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/e9d9e0d4-3d54-462a-af72-4bcb92d2c268%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/tiddlywiki/e9d9e0d4-3d54-462a-af72-4bcb92d2c268%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/55AC7B95-5384-4889-A7AE-82B063FCD22C%40gmail.com
>>  
>> <https://groups.google.com/d/msgid/tiddlywiki/55AC7B95-5384-4889-A7AE-82B063FCD22C%40gmail.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/6f21cff6-261e-4029-bfe7-b231f91477f6%40googlegroups.com.

Reply via email to