I found that a significant part of scripting and HTML parsing is done at the start of the interactions due to the expandThoughtsRecursive function using the strip function to perform sanitization on the values. In my tests, this accounts for at least 15-20% of the interaction time, with 1000 thoughts processed. This could be fixed by moving the sanitization to another stage that's not after every interaction. It is to be noted that if window-like virtualization is implemented, the impact of optimizing this would be reduced as the number of thoughts processed per interaction would be greatly reduced. WDYT?
It looks like strip was added to handle bold/italic/strikethrough. Thoughts that end in : should be pinned open, including <b>:</b>. See #1073. Solved in #1090 but note the unit tests appear to be false positives now.
We can remove strip and replace it with a much faster alternative that just strips closing tags.
It looks like
strip
was added to handle bold/italic/strikethrough. Thoughts that end in:
should be pinned open, including<b>:</b>
. See #1073. Solved in #1090 but note the unit tests appear to be false positives now.We can remove
strip
and replace it with a much faster alternative that just strips closing tags.