You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to this line, on first load, the renderPositionList seems to be called (1..n) times x 31 times, which slows down loading significantly for larger documents.
For documents with 100+ blocks, loading time seems to take 30+ seconds
Since I am not using the position list, I have removed that line for my usage.
Is the following considered typical behaviour for an existing document?
On first load, createBlocks creates each block in the data store
Each block, when added, triggers block:countUpdate which triggers onBlockCountChange with the new count
onBlockCountChange calls renderPositionList, which loops from 0.. new block count.
If 31 blocks are added, the above does DOM manipulation of the select position list n times from 1 to 31, i.e. 1+2+3+4...31 times = 528. For larger documents e.g. 155 blocks, this is 12,090 DOM manipulations.
Or, is my page triggering these events too many times for some other reason? I am running with a the latest version with all the default initialization parameters.
The text was updated successfully, but these errors were encountered:
Stumbled upon this problem with a document containing ~600 blocks. Load time is insane.
If I'm reading code right, onBlockCountChange is called per block.
So, ~600 blocks will result in ~180000 renderPositionList calls
On Thu, 1 Nov 2018 at 22:03, ConstantA ***@***.***> wrote:
Stumbled upon this problem with a document containing ~600 blocks. Load
time is insane.
If I'm reading code right, onBlockCountChange is called per block.
So, ~600 blocks will result in ~180000 renderPositionList calls
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#551 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABvmieOEIr7qxeexikOyLh-ePFL1jdyks5uq2-3gaJpZM4XdTys>
.
I have an existing Sir Trevor document with 31 blocks
sir-trevor-js/src/block-positioner.js
Line 35 in 4e1a20a
Due to this line, on first load, the
renderPositionList
seems to be called (1..n) times x 31 times, which slows down loading significantly for larger documents.For documents with 100+ blocks, loading time seems to take 30+ seconds
Since I am not using the position list, I have removed that line for my usage.
Is the following considered typical behaviour for an existing document?
On first load,
createBlocks
creates each block in the data storeEach block, when added, triggers
block:countUpdate
which triggersonBlockCountChange
with the new countonBlockCountChange
calls renderPositionList, which loops from 0.. new block count.If 31 blocks are added, the above does DOM manipulation of the select position list n times from 1 to 31, i.e. 1+2+3+4...31 times = 528. For larger documents e.g. 155 blocks, this is 12,090 DOM manipulations.
Or, is my page triggering these events too many times for some other reason? I am running with a the latest version with all the default initialization parameters.
The text was updated successfully, but these errors were encountered: