TW5 TiddlyWiki processing while typing?

386 views
Skip to first unread message

Mark S.

unread,
Jul 21, 2014, 2:12:37 PM7/21/14
to tiddl...@googlegroups.com
Apparently when you are editing in a TW5 text field some sort of processing is going on with every keystroke.

Not a problem on my desktop nor with short tiddlers, or empty TW's, but definitely a problem with longish tiddlers running on FireFox on Android.

Is there a way to turn off this behavior? I'm guessing that it's reiterating in order to make real-time changes to titles, styles, and such. But I really only want the TW to update when I've clicked on the finish checkmark.

The problem seems (a little subjective) to have become worse as the TW fills up, so it seems that it's doing something where it loops and looks at the entire contents of the TW.

Thanks,
Mark

Alberto Molina

unread,
Jul 22, 2014, 2:26:14 AM7/22/14
to tiddl...@googlegroups.com
Hi Mark,

It's something already discussed here in the forum. The problem is that you are editing a field on the same tiddler with <$edit-text>, right? Try editing the field from a different tiddler, the refresh on every keystroke should stop.

Regards,
Alberto

Alberto Molina

unread,
Jul 22, 2014, 2:35:56 AM7/22/14
to tiddl...@googlegroups.com
Maybe I didn't understood well your post and you are talking of a different problem.

Alberto

PMario

unread,
Jul 22, 2014, 9:08:40 PM7/22/14
to tiddl...@googlegroups.com
Hi Mark,
Which TW version do you use?
-m

Danielo Rodríguez

unread,
Jul 25, 2014, 4:02:11 PM7/25/14
to tiddl...@googlegroups.com
He is not complaining about the losing focus issue. He is asking if some kind of processing happens on every keystroke. The answer is yes. Tiddlywiky re-evaluates all the displayed tiddlers on every keystroke. This is definitively a problem on limited resources machines.

Jeremy Ruston

unread,
Jul 26, 2014, 4:18:59 AM7/26/14
to TiddlyWiki
Hi Mark

Apparently when you are editing in a TW5 text field some sort of processing is going on with every keystroke.

Each keypress causes the associated tiddler to be saved to the internal JavaScript tiddler store. That triggers the refresh cycle whereby the entire displayed tree of widgets is scanned for anything that needs to be rerendered in the light of the changes to the store.

TiddlyWiki's architecture means that we can't store state in the DOM because the DOM might need to be refreshed at any time. So we can't just leave the partially edited tiddler in the HTML input element until "done" is clicked.

There's a significant optimisation whereby the refresh cycle is deferred until the user stops typing for 400ms. The tiddler is still saved to the store on each keypress, so there's no risk of data loss.

> Not a problem on my desktop nor with short tiddlers, or empty TW's, but definitely a problem with longish tiddlers running on FireFox on Android.

Yes, I've also seen poor performance on lower powered browsers.


> Is there a way to turn off this behavior? I'm guessing that it's reiterating in order to make real-time changes to titles, styles, and such. But I really only want the TW to update when I've clicked on the finish checkmark.

There's no way to turn off the refresh cycle; it is intrinsic to TiddlyWiki's operation.

But we could make the 400ms delay be configurable, and perhaps allow for it to be set to "infinite" whereby we'd defer the refresh cycle until done was clicked.


> The problem seems (a little subjective) to have become worse as the TW fills up, so it seems that it's doing something where it loops and looks at the entire contents of the TW. 

Some sidebar tabs are fairly expensive to refresh, notably "recent".

Best wishes

Jeremy



On Fri, Jul 25, 2014 at 9:02 PM, Danielo Rodríguez <rdan...@gmail.com> wrote:
He is not complaining about the losing focus issue. He is asking if some kind of processing happens on every keystroke. The answer is yes. Tiddlywiky re-evaluates all the displayed tiddlers on every keystroke. This is definitively a problem on limited resources machines.

--
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

Mark S.

unread,
Jul 30, 2014, 2:49:14 PM7/30/14
to tiddl...@googlegroups.com, jeremy...@gmail.com
Hi Jeremy,

The infinite delay option seems like a great idea!

It seems to me that the world is moving away from desktops except for specific high-end applications.

Thanks!
Mark

Mark S.

unread,
May 8, 2015, 7:11:50 PM5/8/15
to tiddl...@googlegroups.com, jeremy...@gmail.com
Was this option ever implemented, or is there some way I can change the delay by hand?

Thanks!
Mark

Danielo Rodríguez

unread,
May 9, 2015, 7:14:45 AM5/9/15
to tiddl...@googlegroups.com
Hello Mark,

Seems that the entire TW community has forgotten about mobile devices, even after Jeremy said that he is very interested on mobile environment.

Måns

unread,
May 9, 2015, 8:25:59 AM5/9/15
to tiddl...@googlegroups.com
Hi Danielo

Not a fair/correct statement...
@Jed's new mobile theme and @Matabele's floating sidebar are major improvements which helps when using TiddlyWiki on mobile devices. 

Check them out.

Cheers Måns Mårtensson 

Mark S.

unread,
May 9, 2015, 1:36:43 PM5/9/15
to tiddl...@googlegroups.com
Cosmetic tweaks are nice and certainly appreciated, but when you're trying to type on a small screen (which can already be challenging) what you really care about is performance.

I rarely care what is going on in the rest of the TW when I'm busy typing in input. I don't need things updating in the background. So a way to dial-back the responsiveness would be very helpful. I figure the 400ms delay is already built in some place in the system. There must be a way to increase that so that typing becomes reasonable.

Thanks!
Mark

Jed Carty

unread,
May 9, 2015, 2:10:03 PM5/9/15
to tiddl...@googlegroups.com
While it doesn't address all of what you are talking about, I made the mobile theme partly to remove the sidebar so that it didn't have to render. This does reduce the amount of work that the wiki has to do and I have seen some small performance improvement when using it on my tablet. Granted I have a relatively powerful tablet and no phone to test it on, so the improvement may not be enough to be worthwhile on less powerful devices.

Most parts of the wiki only render when they are visible, so having the sidebar hidden and now displaying any tiddlers with complex wikitext in them should help performance. This is why in my mobile theme the menus are only visible when you need them, it wasn't only a cosmetic choice.

None of this is to say that your suggestion isn't a good one, I think it would even be an improvement for some of the more complex wikis I have on my desktop. I may be stuck with only my tablet as a computer for a little while in the near future so I am looking into ways that performance can be improved in that context. Your suggestion is a good one, and I will hopefully be able to make something that works. I haven't looked at how it would be done, so it may be beyond my current ability. It would be nice if this is something that I could have set when switching to a mobile theme, but it may require some deeper manipulation of the wiki than is reasonable to do in that context.

Also, since I am very curious and like when people play with my toys, have you tired my mobile theme? I have found that even small suggestions or comments from people can be very helpful and if it isn't useful for you than knowing why would help me improve it.

Måns

unread,
May 9, 2015, 3:21:28 PM5/9/15
to tiddl...@googlegroups.com
Hi Mark

Jed already gave you some very good reasons why to try out his mobile theme.
If you need a faster way to create text/tiddlers in tiddlywiki 
@mat started a "fastnewtiddler" project which allows you to create new tiddlers simply by writing a title and start typing text instantly because you are exposed to an edit template from the start.

I made my own variant here: flownotes.tiddlyspot 
I have tested it on three different Android tablets and one smartphone also running Android. (LGg2).
Writing in tiddlywiki - works just as fast as when I write a sms message - and seems to be faster than writing a message in the messenger app...
I can't say that writing in a TW5 is slower than writing anything else on my mobile devices - sometimes I would say it's even faster than some of the installed apps...

Cheers Måns Mårtensson

Måns

unread,
May 9, 2015, 3:28:23 PM5/9/15
to tiddl...@googlegroups.com
I use Chrome on all my mobile devices... - occasionally I use Firefox - sometimes I use Andtidwiki+...

Mark S.

unread,
May 9, 2015, 6:22:44 PM5/9/15
to tiddl...@googlegroups.com
It's a very  attractive layout, and I'll probably use it for my default on my tablet.  It does seem to help with speed at the start of a new tiddler. But then it slows down again as the working tiddler fills up. It might be that people who are not touch typists would not notice.

Not necessarily show stoppers, but other comments ...

On my 8" screen, the right edge of the floating menus doesn't cover the whole screen. Touching out beyond the edge of the screen takes you to the underlying tiddler, and you have to use the menu to navigate back. It might help if the edge of the floating menu had a visible border.

Maybe this is by design, but in full screen mode the tiddlers become unscrollable, locking you in place. I like the look of the full screen mode, but really need to navigate. In particular, if you try to fill in a form while in full screen mode, you will have to type blind in any field below the top of the software keyboard.

Thanks!
Mark

Måns

unread,
May 9, 2015, 7:27:34 PM5/9/15
to tiddl...@googlegroups.com
Here's a short video demonstrating my little "flownotes" "fastnewtiddler fork" experiment: https://youtu.be/gDwl8TKPWnU 
I mean to add a button to hide/show all tools, so you're left with just a black canvas and green text - for distraction free writing... 

BJ

unread,
May 10, 2015, 3:53:26 PM5/10/15
to tiddl...@googlegroups.com
It is possible to change this value by hacking the core plugin, if you feel adventurous I can walk you through the procedure.

BJ

Mark S.

unread,
May 11, 2015, 10:49:33 AM5/11/15
to tiddl...@googlegroups.com
Hi BJ,

If you want to outline the steps that would be great. I'm sure others will be interested too!

Mark

BJ

unread,
May 11, 2015, 1:21:21 PM5/11/15
to tiddl...@googlegroups.com
  1. first backup your tiddlywiki
  2. install the jsoneditor plugin from http://bjtools.tiddlyspot.com/
  3. find the $:/core tiddler and click on the edit icon
  4. click on the '+' infront of the file icon within the jsonedtor, (now shows 'tiddlers' folder) click on the '+' in front of the tiddlers folder icon, (long list of all core shadow tiddlers appears), scroll down to $:/core/modules/startup/render.js and click on the '+' in front, then click on the icon in front of 'text'
  5. scroll down to the bottom the the list to find the edit pane with 'value:' above it.
  6. within this edit pane find the line 'var DRAFT_TIDDLER_TIMEOUT = 400;' and change the 400 to 4000.
  7. click on the button 'Set value' located under the edit pane.
  8. save the (now modified) s:/core tiddler
  9. save your tw and reload

Jed Carty

unread,
May 11, 2015, 1:54:12 PM5/11/15
to tiddl...@googlegroups.com
That looks like it would be pretty easy to add as a configuration option in the control panel. I don't think that would cause trouble, but I am not sure where in the control panel would be an appropriate place. We may want to add an advanced configuration tiddler somewhere. Probably only a link to it in the control panel so that it doesn't cause a lot of clutter but we can still have the options exposed to the user in a reasonable way.

Mark,

Thanks for the feedback! I have been running around getting ready to move so I am a bit busy. I haven't encountered the scrolling in full screen problem, I will look into it. I had the maximum width set on the menus because I made it on my desktop with a 24" monitor where it was too big when it was the full width, but I should change that since it won't be a problem on mobile devices. My little sister has my tablet for a bit so I won't be able to do any testing for a few days.

Mark S.

unread,
May 11, 2015, 7:01:08 PM5/11/15
to tiddl...@googlegroups.com
Hi BJ,

Your instructions were easy to follow -- thanks!

Unfortunately, I'm not sure that it improved things. Actually, it may have been a little better turning the suggested number down (like to 4). But either way there was still noticeable delay when inputting information, as compared to inputting on a similar web app (simplenotes). Frequently I find I'm typing ahead -- sometimes by half a line or more.

So, there must be something else or some other variable also at play.

Thanks!

Jeremy Ruston

unread,
May 11, 2015, 7:05:21 PM5/11/15
to TiddlyWiki
I've added a configuration tiddler for setting the draft tiddler typing timeout:



There's no UI at present.

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.
Reply all
Reply to author
Forward
0 new messages