Hi Eric!

Thx for the extensive answer which gives me the feeling I really did 
understand the mechanics (I supported your book project with a small amount 
as a reward :)).

performance

You are right that removing the storeArea <div>s might not be noticeable in 
overall browser footprint nor performance. This is due to our today's 
machines are so incredibly fast.
But ... for empty.html the storeArea makes up about 80% of the DOM content. 
This ratio won't change much when the wiki grows containing lots of 
pictures, because they also show up in the storeArea redundantly (even in a 
bloated way). The bigger the wiki content is, the bigger the saving will 
be. So removing it might be favorable from an esthetical point of view (and 
makes DOM analysis easier in the browser)?

your patch

I tried, but did not succeed because the tiddler apparently is not executed 
(no printout in console). I tried this:

<div created="20141219083117905" modified="20141219083749614" tags=
"systemConfig" title="empty storeArea after boot" type=
"application/javascript">
<pre>console.log( &quot;empty storeArea after boot&quot; );
removeChildren(document.getElementById('storeArea'));</pre>
</div>

I probably do it wrong. 


Thanks you very much again,

. Jörg


Am Donnerstag, 18. Dezember 2014 17:58:18 UTC+1 schrieb Eric Shulman:
>
> On Thursday, December 18, 2014 6:52:41 AM UTC-8, whatever wrote:
>>
>> If you're talking about TWC: the storeArea reflects the state as it was 
>> at last save. So if you add or delete tiddlers but don't save, the actual 
>> file doesn't reflect those changes until you actually save it. The changes 
>> are only in the memory till then.
>>
>
> Actually, to be more precise, in TWC the storeArea element in the HTML 
> source is *NOT* updated after the document is loaded into the browser.  At 
> startup, the contents of storeArea are copied into the TW core 'store' 
> JavaScript object.  All changes to tiddlers are made to the data in that 
> object. Then, when saving, a text string using HTML syntax is generated 
> from the store data.  Next, the entire source of the TWC document is read 
> in from the original file on disk (or reconstructed from the 
> document.innerHTML if file I/O is not permitted) and 
> the HTML-formatted text string containing the revised store data is 
> inserted in place of the previously saved storeArea definition.  The file 
> is then written back to the filesystem (or a "download/save" is triggered 
> if file I/O is not permitted).
>
> Given the above handling, it seems that the storeArea HTML element that is 
> loaded at startup is not actually needed once the data has been copied into 
> the 'store' object.  Thus, it *may* be useful to clear the storeArea 
> element after startup to save some run-time memory... but it might not be 
> all that much of a difference compared to the total run-time "footprint" of 
> the browser (which my TaskManager window shows to be around 30-50Mb for 
> each open browser window/tab). Even if 
> you are running a particularly large TWC document (i.e., with several 
> megabytes of tiddlers in the storeArea), trimming a few Mb of space off 
> that total is unlikely to make much of a performance difference.
>
> In any case, you can experiment with this (in TWC) without needing any 
> core changes.  Just create a tiddler, tagged with 'systemConfig', 
> containing the following line of code:
> removeChildren(document.getElementById('storeArea'));
> At start up, this code will be invoked, and will remove the storeArea 
> contents.  Note that it leaves behind an empty storeArea *element*, so that 
> if some core code that looks for that element, it will not crash, even 
> though the storeArea is now empty.
>
> ---------
> THERE ARE LESS THAN 30 DAYS REMAINING IN THE "InsideTiddlyWiki" FUNDRAISER!
> YOUR DONATIONS ARE VERY IMPORTANT!
> HELP ME TO HELP YOU - MAKE A GENEROUS CONTRIBUTION TODAY:
>
> "Inside TiddlyWiki: The Missing Manual"
>
> https://www.indiegogo.com/projects/inside-tiddlywiki-the-missing-manual/x/8816263
> ---------
>
> enjoy,
> -e
> Eric Shulman
> TiddlyTools / ELS Design Studios
> Professional TiddlyWiki Consulting Services... Analysis, Design, and 
> Custom Solutions:
>    http://www.TiddlyTools.com/#Contact
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to