[NodeJS][Android] TiddlyWiki takes 30 seconds to load modules in ARM architecture

158 views
Skip to first unread message

Arlen Beiler

unread,
Sep 11, 2018, 11:58:35 PM9/11/18
to TiddlyWiki
I ran some tests this morning and discovered why it takes so long for TiddlyWiki and TiddlyServer to load datafolders on Android with Dory and Termux. Apparently there is something about the process of converting the tiddlers into code that is very slow on android. TiddlyServer loads one file containing all the core tiddlers and yet it takes 30 seconds to list all the core tiddlers in a --prof dump file. 

In other words, I ran a --prof on TiddlyServer loading a data folder, and then searched for all strings starting with "$:/" and it gave me a list of all the core tiddlers over a span of 30 seconds. 

So this means that the filesystem is definitely not the bottle neck. I'm investigating ways to improve performance. 

Just thought I'd share that and see if anyone else has any input.
Arlen

Arlen Beiler

unread,
Sep 12, 2018, 12:21:48 AM9/12/18
to TiddlyWiki
After some more investigation, it seems like this is a known problem with v8 on ARM. 

Mark S.

unread,
Sep 12, 2018, 9:28:01 AM9/12/18
to TiddlyWiki
TiddlyWiki in general is slow for me on my circa 2012 Samsung devices. Takes 20 to 30 seconds to load a stand-alone TW file.

-- Mark

@TiddlyTweeter

unread,
Sep 12, 2018, 10:29:47 AM9/12/18
to TiddlyWiki
Mark S. wrote:
TiddlyWiki in general is slow for me on my circa 2012 Samsung devices. Takes 20 to 30 seconds to load a stand-alone TW file.

I don't mind waiting once in a while as I now know the bang for buck. But IF it were my first time testing it, as a possible future user, its a complete and utter turn off.

Arlen Beiler

unread,
Sep 12, 2018, 9:24:41 PM9/12/18
to TiddlyWiki
Maybe we should add a feature where it saves a render of the startup tiddlers which will display until the render tree is up and running. 

I wonder if it is possible to show a progress indicator as well, but the code we're talking about here is completely synchronous. 

I also wonder what would happen if we compiled it all into one file using something like webpack. I'm sure we could write our own because most modules have the same environment. 

--
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/f444f706-3ad7-4a5d-9c82-33a701a31a48%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Riz

unread,
Sep 14, 2018, 12:01:04 AM9/14/18
to TiddlyWiki

Arlen Beiler

unread,
Sep 14, 2018, 10:25:34 PM9/14/18
to TiddlyWiki
Wow, vm.runInNewContext is the culprit. I changed the code to use the Function factory and it loads in 2.5 seconds. 

I think I'll open an issue.

On Fri, Sep 14, 2018, 12:01 Riz <madapeed...@gmail.com> wrote:


--
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 https://groups.google.com/group/tiddlywiki.

For more options, visit https://groups.google.com/d/optout.

On Fri, Sep 14, 2018, 12:01 Riz <madapeed...@gmail.com> wrote:


--
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 https://groups.google.com/group/tiddlywiki.

Arlen Beiler

unread,
Sep 14, 2018, 11:15:17 PM9/14/18
to TiddlyWiki

@TiddlyTweeter

unread,
Sep 15, 2018, 6:45:51 AM9/15/18
to TiddlyWiki
I posted enthusiastically about this thread here: https://groups.google.com/d/msg/tiddlywiki/GUnOZYd6_oY/5CxNTf4cCQAJ

This is a very interesting thread because it seems to get to the heart of Android usage issues.

The one comment I want to make (as a NON-programmer) is in actual life I need a simple app I can download and get started. Looking at having to compile stuff on node is a total non-starter for me, and, I think, most potential users.

Best wishes
Josiah

Arlen Beiler

unread,
Sep 16, 2018, 1:25:33 AM9/16/18
to TiddlyWiki
You definitely don't have to compile stuff. You just need to do a little configuring of apps, but now that I discovered Dory, the need for that has gone down. Sometime soon I will write an app to generate the configuraton automatically. 

If you want to contribute toward the cost of time, there's a link on the TiddlyServer GitHub repo. 

--
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 https://groups.google.com/group/tiddlywiki.
Reply all
Reply to author
Forward
0 new messages