Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using lotsof CPU #10

Open
linonetwo opened this issue Feb 20, 2022 · 3 comments
Open

Using lotsof CPU #10

linonetwo opened this issue Feb 20, 2022 · 3 comments

Comments

@linonetwo
Copy link

A12F340EE4776AC44D4CC2BA1B26F034

When typing

@linonetwo
Copy link
Author

Similar to #8

@linonetwo
Copy link
Author

linonetwo commented Apr 24, 2022

var allTiddlers = options.wiki.makeTiddlerIterator(options.wiki.getTiddlers());

This is inside a getGlobalCache call, which is

Return a named global cache object. Global cache objects are cleared whenever a tiddler change.

So when typing (cause a tiddler change.), the cache will invalidate, so there will be tons of calls to the initializer when typing!

This line, the most cost is on this getTiddlers

@linonetwo
Copy link
Author

linonetwo commented Apr 24, 2022

Maybe you can debounce before any update, otherwise typing will be very lagging.


Seems its section editor that not debounce, its section lacks of draft.of field, so every type will trigger rerender.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant