homegrown speed test

106 views
Skip to first unread message

Rustem

unread,
Jul 9, 2015, 7:02:41 PM7/9/15
to tiddl...@googlegroups.com

Not sure how useful this is, but seeing that there are some performance-related commits in GitHub lately, I compared the two filters by simply copying each if the two lists below 20,000 times in a tiddler. all[current] is almost double the speed of <currentTiddler>, 1min 15sec vs. 2 min 20 sec on my Core-i7. There is probably some datatype conversion happening with the latter.

<$list filter="[all[current]]">&#xfeff;</$list>
<$list filter="[<currentTiddler>]">&#xfeff;</$list>

PMario

unread,
Jul 10, 2015, 5:35:02 AM7/10/15
to tiddl...@googlegroups.com
Hi,
I'm not sure, what you try to achieve but it you test this:

<$list filter="[all[current]]"><$view field=title></$list>

<$list filter="[<currentTiddler>]" ><$view field=title></$list>

imo the second example isn't a valid filter, since it never produces a list.


-----


If you want to enable speed measuring in your TW, you can enable it like this:

open: http://tiddlywiki.com/#%24%3A%2Fcore%2Fmodules%2Fstartup.js

at line 20 set

// Set to `true` to enable performance instrumentation
var PERFORMANCE_INSTRUMENTATION = false;

to

// Set to `true` to enable performance instrumentation
var PERFORMANCE_INSTRUMENTATION = true;

Save and reload the TW.

The browser console [f12] will show you some performance info.
-m

Rustem

unread,
Jul 10, 2015, 5:42:54 AM7/10/15
to tiddl...@googlegroups.com
I wanted to see which one is faster. They produce the same output. Not sure why you don't see a list in the second example. I just copied it from your reply into a new tiddler and it shows "New Tiddler", as expected.

Rustem

unread,
Jul 10, 2015, 5:50:20 AM7/10/15
to tiddl...@googlegroups.com

Also,

<$list filter="[all[current]tagging[]]">.</$list> is about 25% faster than <$list filter="[tag<currentTiddler>]">.</$list> , and {{!!title}} is 10 times faster than <<currentTiddler>>! Not sure if the time grows linearly, I used 100,000 copies for the latter comparison.

—R

Rustem

unread,
Jul 10, 2015, 2:13:56 PM7/10/15
to tiddl...@googlegroups.com
Closing slash is missing from the view widget in your example, that's why the second list doesn't work. This works:
```
<$list filter="[all[current]]"> 1 <$view field=title/></$list>
<$list filter="[<currentTiddler>]"> 2 <$view field=title/></$list>
```


On Friday, July 10, 2015 at 2:35:02 AM UTC-7, PMario wrote:
Reply all
Reply to author
Forward
0 new messages