Speeding up the list widget - did I find a way? #8103
Closed
BurningTreeC
started this conversation in
Ideas
Replies: 1 comment
-
Oh, I've found that this causes problems |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I was tinkering around in the
list
widget'shandleListChanges
method and the base widget'srefreshChildren
method and found a way to reduce the amount of times children get (unnecessarily? I don't know) refreshed.First of all I must say that I don't really understand why it's working.
On first render of a list widget I set
this.isFirstRender
to true and set it to false afterhandleListChanges
has run through.In the base widget's
refreshChildren
method I do the following:This is to get
this.hasRefreshed
available in the list widget. Here's the checkthis.isEven(i)
which is needed as I found out but I don't know why.After this in the
list
widget'shandleListChanges
method where it's about to refresh the child widgets I do the following:Again, don't ask me why it's working altogether. The variable names may also be misleading.
But this reduces the mainRefresh by a big amount if there are for example many tiddlers open.
What do you think? Is this worth exploring?
Can you tell me why and how this works?
Thank you,
Simon
Beta Was this translation helpful? Give feedback.
All reactions