Skip to content

Improve performance of column resizing mousemouse handler by debouncing#154

Open
bZichett wants to merge 1 commit intoProseMirror:masterfrom
ProjectAMPLE:performance-columnresizing-domevents
Open

Improve performance of column resizing mousemouse handler by debouncing#154
bZichett wants to merge 1 commit intoProseMirror:masterfrom
ProjectAMPLE:performance-columnresizing-domevents

Conversation

@bZichett
Copy link

@bZichett bZichett commented Nov 9, 2021

Note: This pull request targets prosemirror documents with large table nodes

  1. Could add a debounce to package dependencies instead of adding to utils

  2. Might be nice to only debounce when detecting that the table node is "large enough". What the criteria is might be up to the developer. But regardless, even for small table nodes, the UI doesnt need to update as frequently. Also depending on use case, maybe it could be a throttle

The debounce time of 100ms seemed to be a "sweet spot" but it could also dynamically slow down according to table node size. I imagine that for very large tables, it should be even longer.

@bZichett bZichett closed this Nov 19, 2021
@bZichett bZichett reopened this Nov 19, 2021
@bZichett
Copy link
Author

Was thinking this should only start happening when the table is large enough. The UX is a bit less nice for no reason for very basic tables.

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

Successfully merging this pull request may close these issues.

1 participant