Skip to content

Commit

Permalink
perf: decrease virtual scroll render throttling to 5ms
Browse files Browse the repository at this point in the history
- see SlickGrid [comment](6pac/SlickGrid#219 (comment)) for more info
- a lower thottling delay will show less blank area after scrolling to an uncached scroll position (using the scroll to position it very far down)
- NOTE: a throttling of 0ms causes flickering in some cases, but 5ms seems like a good number to use
  • Loading branch information
ghiscoding-SE committed Aug 22, 2024
1 parent 559d7de commit 4419132
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/common/src/core/slickGrid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ export class SlickGrid<TData = any, C extends Column<TData> = Column<TData>, O e
editorCellNavOnLRKeys: false,
enableMouseWheelScrollHandler: true,
doPaging: true,
scrollRenderThrottling: 50,
scrollRenderThrottling: 5,
suppressCssChangesOnHiddenInit: false,
ffMaxSupportedCssHeight: 6000000,
maxSupportedCssHeight: 1000000000,
Expand Down
2 changes: 1 addition & 1 deletion packages/common/src/interfaces/gridOption.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ export interface GridOption<C extends Column = Column> {
*/
sanitizer?: (dirtyHtml: string) => string | TrustedHTML;

/** Defaults to 50, render throttling when scrolling large dataset */
/** Defaults to 5, render throttling when using virtual scroll on large dataset */
scrollRenderThrottling?: number;

/** CSS class name used when cell is selected */
Expand Down

0 comments on commit 4419132

Please sign in to comment.