Fully disable (re-)rendering of widgets

79 views
Skip to first unread message

compa...@gmail.com

unread,
May 25, 2021, 3:54:05 AM5/25/21
to TiddlyWiki

Hi,

is it possible to (temporarily) disable (re-)rendering of the frontend (widgets etc.)?

Thanks,
Mirko

PMario

unread,
May 25, 2021, 10:55:28 AM5/25/21
to TiddlyWiki
On Tuesday, May 25, 2021 at 9:54:05 AM UTC+2 compa...@gmail.com wrote:

is it possible to (temporarily) disable (re-)rendering of the frontend (widgets etc.)?

No. At the moment it isn't. What would you try to achieve?
-m

compa...@gmail.com

unread,
May 25, 2021, 11:48:27 AM5/25/21
to TiddlyWiki
Hi Mario,

currently i'm working with a rather complex Widget Structure (Table-Tree with Streams rendered within the (large number of) nodes) and i'm not interested in "possible changes" to the UI - i just want to edit as fast and as smooth as possible.
Whenever i edit a stream-node (even when typing a single char), the full widget-tree re-renders, which makes working with it a pain atm. Now i try to adress this issue somehow...

Mirko

compa...@gmail.com

unread,
May 25, 2021, 11:49:28 AM5/25/21
to TiddlyWiki
SQ-Streams  i mean btw.

Soren Bjornstad

unread,
May 25, 2021, 11:51:17 AM5/25/21
to TiddlyWiki
Refresh throttling might be helpful here.

compa...@gmail.com

unread,
May 25, 2021, 11:58:45 AM5/25/21
to TiddlyWiki
Hi Soren,

thanks for that idea! This would be a cool solution if i would just need to add 'draft.of' or ' throttle.refresh' to the outer widget (e.g. my Tree-Table). But it reads, as i would need to add it to all sq-stream nodes... wouldn't be my first choice to "bake" it into the nodes-creation-mechanism - isn't there a similar way on something like the "parent-widget of any widget-tree"?

Regards,
Mirko

Saq Imtiaz

unread,
May 25, 2021, 12:26:29 PM5/25/21
to TiddlyWiki
@Mirko, that is interesting. 

Do you have the same experience when using Streams directly, for example at https://saqimtiaz.github.io/sq-tw/streams-tiddlytoolmap2.html ?

Are you using Streams 0.2+ ? The latest version is available at https://saqimtiaz.github.io/streams/

If you are able to share I would like to take a look at your file. It is possible that there is something about your widget structure that is forcing the streams nodes to re-render. A common issue can be a vars/set/wikify widget wrapped around other widgets which can cause them to be re-rendered every time depending on how they are used.

Also note that using the Sticky titles option in the tiddlywiki theme might cause performance issue, as well as backreferences from Stroll. See: https://github.com/saqimtiaz/streams/issues/8#issuecomment-738850160

I actually looked into using refresh throttling in Streams but haven't pursued it as the feedback on performance optimizations in Streams 0.2 have indicated that performance isn't a problem. Personally I find it difficult to gauge performance as my daily driver machine is quite powerful.

I've also done some work on a version of Streams that can optionally use the dynaview plugin to only render nodes that are on the screen. It worked well but had a few edge cases that needed resolving. It's another avenue I haven't pursued further in light of performance improvements.

Saq

compa...@gmail.com

unread,
May 26, 2021, 2:39:28 AM5/26/21
to TiddlyWiki
Hi Saq,

thanks for your response!

Yes, i'm using Streams 0.2+. When typing on https://saqimtiaz.github.io/sq-tw/streams-tiddlytoolmap2.html it "feels" also relatively lazy when typing fast, but there you have a huge stream (much much larger than my ones). Console states for my browser (FF) between 150ms and 240ms mainRefresh for each keystroke (which is a lot when you type fast) at your toolmap.

In my wiki (aaldrich-tables in combination with content-nodes based on your streams-plugin) i have ~500ms mainRefresh for each keystroke... as it is not that easy to give my wiki away atm, i will first investigate a little on my own regarding your "vars/set/wikify widget"-hint, which i definitely have within my structure...

Anyway would it be nice to be able to disable the TW5-rerendering (temporarily) globally. i will open a feature request.

Thanks,
Mirko

Saq Imtiaz

unread,
May 26, 2021, 3:28:41 AM5/26/21
to TiddlyWiki
Hi Mirko,

Yes, i'm using Streams 0.2+. When typing on https://saqimtiaz.github.io/sq-tw/streams-tiddlytoolmap2.html it "feels" also relatively lazy when typing fast, but there you have a huge stream (much much larger than my ones). Console states for my browser (FF) between 150ms and 240ms mainRefresh for each keystroke (which is a lot when you type fast) at your toolmap.

I intentionally use that wiki to test for performance issues as they get amplified due the size of the stream. With smaller streams there are no noticeable delays when typing.  So if your own streams are much smaller, then there has to be another reason that the performance is so much slower.
 
In my wiki (aaldrich-tables in combination with content-nodes based on your streams-plugin) i have ~500ms mainRefresh for each keystroke... as it is not that easy to give my wiki away atm, i will first investigate a little on my own regarding your "vars/set/wikify widget"-hint, which i definitely have within my structure...

If you inspect the DOM structure of the streams in the web developer tools and see that they blink/refresh on every keystroke, that is a very good indicator that something in your widget tree causes everything to be re-rendered on each key stroke. You will notice that this does not happen when using Streams on the toolmap wiki or on the Streams demo site.

When a variable set by the vars/set/wikify widget changes, that widget needs to remove and re-render all its children for them to be informed of the new variable value.
  
Anyway would it be nice to be able to disable the TW5-rerendering (temporarily) globally. i will open a feature request.


One hack here would be to write a widget that you wrap your templates in, which does not refresh its children. Note however that such an approach, or any approach that disables refresh, opens the door for data loss.
 
Regards,
Saq

compa...@gmail.com

unread,
May 27, 2021, 4:14:09 AM5/27/21
to TiddlyWiki
Hi Saq,

would it be an option for Streams to set "open" nodes into TW's draft-Mode?
Thinking a little more about the problem, Soren's idea is maybe worth to think about closer.

Regards,
Mirko

Saq Imtiaz

unread,
May 27, 2021, 4:21:02 AM5/27/21
to TiddlyWiki
@Mirko that would require a complete rewrite of the plugin, so unfortunately if I ever do get around to it, it wont be any time soon.

Saq Imtiaz

unread,
May 27, 2021, 4:31:07 AM5/27/21
to TiddlyWiki
Also, I don't think using drafts or throttling will help much in your situation Mirko. It would just mean the refresh and re-render of the entire tree happens every few keystrokes rather than on every keystroke.
Reply all
Reply to author
Forward
0 new messages