From 4419132e3664d8a5381a664da67d5f4ea6589ecb Mon Sep 17 00:00:00 2001 From: ghiscoding Date: Thu, 22 Aug 2024 14:10:24 -0400 Subject: [PATCH] perf: decrease virtual scroll render throttling to 5ms - see SlickGrid [comment](https://github.com/6pac/SlickGrid/issues/219#issuecomment-1630077429) 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 --- packages/common/src/core/slickGrid.ts | 2 +- packages/common/src/interfaces/gridOption.interface.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/common/src/core/slickGrid.ts b/packages/common/src/core/slickGrid.ts index a57e6e201..b4e6c4224 100644 --- a/packages/common/src/core/slickGrid.ts +++ b/packages/common/src/core/slickGrid.ts @@ -275,7 +275,7 @@ export class SlickGrid = Column, O e editorCellNavOnLRKeys: false, enableMouseWheelScrollHandler: true, doPaging: true, - scrollRenderThrottling: 50, + scrollRenderThrottling: 5, suppressCssChangesOnHiddenInit: false, ffMaxSupportedCssHeight: 6000000, maxSupportedCssHeight: 1000000000, diff --git a/packages/common/src/interfaces/gridOption.interface.ts b/packages/common/src/interfaces/gridOption.interface.ts index 6fe675137..590b93b1f 100644 --- a/packages/common/src/interfaces/gridOption.interface.ts +++ b/packages/common/src/interfaces/gridOption.interface.ts @@ -739,7 +739,7 @@ export interface GridOption { */ 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 */