felixhayashi / TW5-TiddlyMap

Map drawing and topic visualization for your wiki

Home Page:http://tiddlymap.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Slow loading with Huge tiddlywiki HTML (50M, gzip to 5M), parsing takes forever.

linonetwo opened this issue · comments

Describe the bug
I have a wiki https://onetwo.ren/CDDA-Kenan-Modpack-Chinese/#Abrahms_MartialArts%E2%86%92martial_art%E2%86%92style_knifefighting that takes too long to be able to interact, while network request only takes 1s.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://onetwo.ren/CDDA-Kenan-Modpack-Chinese/#Abrahms_MartialArts%E2%86%92martial_art%E2%86%92style_knifefighting
  2. See network request done in 1-2s in devtool network tab
  3. But its Javascript is running forever
  4. (unable to interact)

Expected behavior
It's able to scroll or click button, at least interact with current tiddler. Other jobs can be delay or lazy-done.

Screenshots

1AB432A16E871B2F791DA092C538852C
截屏2021-04-07 上午11 41 24
截屏2021-04-07 上午11 41 15
截屏2021-04-07 上午11 41 00
截屏2021-04-07 上午11 40 23
截屏2021-04-07 上午11 46 14
截屏2021-04-07 上午11 44 11
截屏2021-04-07 上午11 44 26
截屏2021-04-07 上午11 45 58
截屏2021-04-07 上午11 46 09

In the developer console window enter 'getEventListeners(window)' and see what the results are. I noticed you have 32k+ tiddlers and you also sync it up on github. I recorded the performance for a few minutes and noticed that the events taking the highest percentage of time were the paint and rendering in the browser. And I wasn't doing much more than poking through the control panel once I found and selected English.

Just a suggestion. I have to wonder if one of the events running is the syncing of the wiki to github, or the refresh of images stored on github. I noticed one of the plugins appeared to poll the disk at intervals to update the wiki if a file or image had changed.

Just some random thoughts poking through the monster.