[TW5] Node.js vs. single HTML

1,079 views
Skip to first unread message

Ulrik Stervbo

unread,
Jun 23, 2014, 4:29:23 PM6/23/14
to tiddl...@googlegroups.com
Hello list,

What are the advantages of running the tiddlywiki as a node.js app rather than a single file? Other than the wiki is being run as a server and can be accessed from outside.

Are there any performance advantages? I am particularly thinking about memory usage: are the tid-files in the node.js read as needed or are they all read in at start up, making it not much different from the single HTML file variant?

I am interested, because it seems I will be generating a large file - for now it is just 3mb, but when I add some long tables, it may become close to 10mb. And I will keep adding. I have seen posts that tiddlywiki starts to slow down dramatically at some point (20mb if my memory serves me well). Is there any way to avoid that?

Thanks for any comments.

Cheers,
Ulrik

Jeremy Ruston

unread,
Jun 24, 2014, 3:06:01 AM6/24/14
to TiddlyWiki
Hi Ulrik

> Are there any performance advantages? I am particularly thinking about memory usage: are the tid-files in the node.js read as needed or are they all read in at start up, making it not much different from the single HTML file variant?

Under Node.js all tiddlers are loaded into memory at startup, so there is little difference in terms of performance.

But of course you can run TW under Node.js to generate a static, JavaScript-less version of a wiki; in practice that can often give much better performance in the browser.

I am interested, because it seems I will be generating a large file - for now it is just 3mb, but when I add some long tables, it may become close to 10mb. And I will keep adding. I have seen posts that tiddlywiki starts to slow down dramatically at some point (20mb if my memory serves me well). Is there any way to avoid that?

We've had reports of people being able to run TW5 documents of 50-100mb. There are some functions of TW5 that get slower with more tiddlers (mainly the sidebar lists), but it's straightforward to adapt the UI to avoid them.

Best wishes

Jeremy





--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

Xavier Cazin

unread,
Jun 24, 2014, 3:28:16 AM6/24/14
to tiddl...@googlegroups.com
Hi Ulrik,

I am interested, because it seems I will be generating a large file - for now it is just 3mb, but when I add some long tables, it may become close to 10mb. And I will keep adding. I have seen posts that tiddlywiki starts to slow down dramatically at some point (20mb if my memory serves me well). Is there any way to avoid that?

If you use a sync app like owncloud or dropbox to keep your files safe, you will see an advantage to the server mode in terms of bandwith usage: instead of synchronising one big file each time you are changing a tiddler, you'll sync only the file corresponding to the tiddler you are editing.

Cheers,
Xavier.


Ulrik Stervbo

unread,
Jun 24, 2014, 4:03:13 AM6/24/14
to tiddl...@googlegroups.com
Thanks for the clarification

Cheers,
Ulrik


--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/AMhdMXEM-xk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.

dodoo

unread,
Jun 25, 2014, 11:09:25 AM6/25/14
to tiddl...@googlegroups.com
I choose Node.js for the same reason. 
But I am worry about the security issue of cloud storage. Is there handy tool can automatically encrypt .tid file in local before sync with cloud?

在 2014年6月24日星期二UTC+8下午3时28分16秒,Xavier写道:

Mike Smith

unread,
May 25, 2017, 11:54:09 AM5/25/17
to TiddlyWiki, jeremy...@gmail.com
If tiddlers are stored in separate files, does that mean that multiple users can edit the wiki as long as they dont edit the same tiddler? For tiddlers, a save then overwrites the file that was previously there?

cheers

mike

Xavier Cazin

unread,
May 25, 2017, 12:20:01 PM5/25/17
to tiddl...@googlegroups.com
Hi Mike,

On Thu, May 25, 2017 at 5:54 PM, Mike Smith <mikjs...@gmail.com> wrote:
If tiddlers are stored in separate files, does that mean that multiple users can edit the wiki as long as they dont edit the same tiddler? For tiddlers, a save then overwrites the file that was previously there?

Yes to both questions.

Cheers,
-- Xavier Cazin
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscribe@googlegroups.com.

To post to this group, send email to tiddl...@googlegroups.com.

Mark S.

unread,
May 25, 2017, 12:27:14 PM5/25/17
to TiddlyWiki
The ability to handle larger files is going to depend on the physical abilities of your machine. I have a pretty good set up, but hit the wall between around 20 megs. If you load your TW on a tablet or phone, the limit is going to be lower. It takes about 30 seconds or more to load a 10 meg file on my phone ... and sometimes it won't load at all. The thing to do would be to test your system. You can load up your TW pretty quickly by dragging and dropping images.

With node.js, you can't refer to external images or files on your local device. To access them, you would need a separate file server. To me that's a big reason not to use node.js.

Good luck!
Mark

Mark S.

unread,
May 25, 2017, 12:29:07 PM5/25/17
to TiddlyWiki
I haven't tried this yet, but just today I was reading about cryptomater (https://cryptomator.org/) which encrypts your data before loading to drop box. It (or something like it) might be able to add a layer of security.

Good luck,
Mark

Conner Phillips

unread,
May 25, 2017, 1:25:02 PM5/25/17
to TiddlyWiki
You say a separate file server. Wouldn't just the appropriate module being loaded into the node.js server get the job done? What is the current state of media in node.js tiddlers? 64-bit encoded objects?

Mark S.

unread,
May 25, 2017, 1:47:29 PM5/25/17
to TiddlyWiki
Your separate server could also run in another instance of node.js. But it would have it's own IP number and so the served files could not be accessed via TW as relative files. If there's a way to make the file server run in the same instance as TW with the same IP and port, that would be interesting to learn about.

Mark

Arlen Beiler

unread,
May 25, 2017, 3:37:51 PM5/25/17
to TiddlyWiki
Here is a gist I made showing the gist of how to get multiple TiddlyWikis to run under one ExpressJS server. It works perfectly with Node HTTP server as well, but you need to do the express routing yourself.

--
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 tiddlywiki+unsubscribe@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.

Arlen Beiler

unread,
May 25, 2017, 3:39:19 PM5/25/17
to TiddlyWiki

Mike Smith

unread,
May 26, 2017, 2:51:21 AM5/26/17
to TiddlyWiki
Is there any way of knowing if someone else is editing the same tiddler?

Xavier Cazin

unread,
May 26, 2017, 3:32:38 AM5/26/17
to tiddl...@googlegroups.com
Hi Mike,

Something along the following lines?

<ul>
<$list filter="[has[draft.of]]">
<li>__Caution__: the tiddler ''<$view field="draft.of"/>'' is currently being edited (by ''<$view field="modifier"/>'')</li>
</$list>
</ul>


Cheers,
Xavier.

-- Xavier Cazin

On Fri, May 26, 2017 at 8:51 AM, Mike Smith <mikjs...@gmail.com> wrote:
Is there any way of knowing if someone else is editing the same tiddler?
--
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 tiddlywiki+unsubscribe@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.

Mike Smith

unread,
May 26, 2017, 4:54:39 AM5/26/17
to Xavier Cazin
Fantastic!! Ive done a couple of list filters before and just copied it into the tiddler... can this be included in all tiddlers by default (a template)?

Thanks again, this is so so helpful in a small multi-user environment

cheers

mike


Friday, May 26, 2017, 8:32:03 AM, you wrote:

Hi Mike,

Something along the following lines?

<ul>
<$list filter="[has[draft.of]]">
<li>__Caution__: the tiddler ''<$view field="draft.of"/>'' is currently being edited (by ''<$view field="modifier"/>'')</li>
</$list>
</ul>

Cheers,
Xavier.

-- Xavier Cazin

On Fri, May 26, 2017 at 8:51 AM, Mike Smith <
mikjs...@gmail.com> wrote:
Is there any way of knowing if someone else is editing the same tiddler?

--
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 tiddlywiki+...@googlegroups.com.

To post to this group, send email to

To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/9897207a-e55e-4793-a4a4-070c0c49bc98%40googlegroups.com.
For more options, visit
https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/tiddlywiki/AMhdMXEM-xk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
tiddlywiki+...@googlegroups.com.

To post to this group, send email to

Xavier Cazin

unread,
May 26, 2017, 6:00:11 AM5/26/17
to tiddl...@googlegroups.com
Hi Mike,

If you create a tiddler that lists the current drafts, give it the system tag $:/tags/EditTemplate as well as a list-after field with the value $:/ContributionBanner, you'll end up with a list of current drafts appearing under the pink contribution banner whenever you edit a tiddler.

Cheers,

Xavier


-- Xavier Cazin

On Fri, May 26, 2017 at 10:42 AM, Mike Smith <mi...@hsm.org.uk> wrote:
Fantastic!! Ive done a couple of list filters before and just copied it into the tiddler... can this be included in all tiddlers by default (a template)?

Thanks again, this is so so helpful in a small multi-user environment

cheers

mike


Friday, May 26, 2017, 8:32:03 AM, you wrote:

Hi Mike,

Something along the following lines?

<ul>
<$list filter="[has[draft.of]]">
<li>__Caution__: the tiddler ''<$view field="draft.of"/>'' is currently being edited (by ''<$view field="modifier"/>'')</li>
</$list>
</ul>

Cheers,
Xavier.

-- Xavier Cazin

On Fri, May 26, 2017 at 8:51 AM, Mike Smith <
mikjs...@gmail.com> wrote:
Is there any way of knowing if someone else is editing the same tiddler?

--
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 tiddlywiki+unsubscribe@googlegroups.com.

To post to this group, send email to

To view this discussion on the web visit
--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/tiddlywiki/AMhdMXEM-xk/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
tiddlywiki+unsubscribe@googlegroups.com.

To post to this group, send email to

To view this discussion on the web visit
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 tiddlywiki+unsubscribe@googlegroups.com.

To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
Reply all
Reply to author
Forward
0 new messages