Closed linonetwo closed 1 year ago
It takes 2s to run on my 10k+ tiddlers
Because this will call filterTiddlers many times.
return [yearDates.get(t).map(([e,t])=>{ var r = $tw.wiki.filterTiddlers(getFilterByDate(t, a)).length; return n += r, [e, r] }
https://github.com/tiddly-gittly/tw-echarts/blob/d9526787ad776d0c5381e00ec3cd5bdc0ab2dd53/src/echarts/addons/Gk0Wk/GitHubHeatMap.ts#L29-L38
This .map function callback
before: 3s
after: 0.15s
https://github.com/tiddly-gittly/tw-echarts/commit/7742b9ac1aad14a53d6af3d6cf3b48b6a0f25639
It takes 2s to run on my 10k+ tiddlers
Because this will call filterTiddlers many times.