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
Copy file name to clipboardExpand all lines: packages/main/src/components/AnalyticalTable/docs/FAQ.mdx
+12-55Lines changed: 12 additions & 55 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,70 +10,27 @@ import * as ComponentStories from './AnalyticalTable.stories';
10
10
11
11
<TableOfContent />
12
12
13
-
## Why is the AnalyticalTable slow in development mode?
13
+
## Why is the AnalyticalTable slower in development mode?
14
14
15
-
When using the `AnalyticalTable` (or other virtualized components) in development mode, you may experience noticeable performance degradation compared to production builds. This is expected behavior caused by the combination of **React's dev mode overhead** and **browser debugger instrumentation**.
15
+
The `AnalyticalTable` (and other virtualized components) run somewhat slower in development mode than in production builds. This gap has been reduced significantly over time and is usually a minor annoyance rather than a blocker, but on slower machines or with very large datasets you may still notice it.
16
16
17
-
### Why Dev Mode is Slower
17
+
If the difference is bothering you, the following tend to help:
18
18
19
-
#### React Dev Mode Overhead
19
+
1.**Test with production builds** when working on performance-sensitive features — this also gives you accurate performance metrics.
20
+
2.**Try Firefox or Safari for development** — they have lighter debugger overhead in dev mode than Chromium-based browsers.
21
+
3.**Close DevTools when not actively debugging**, and consider disabling the React DevTools browser extension — both add overhead even when DevTools is closed.
20
22
21
-
React's development build includes significant overhead:
22
-
23
-
-**Strict Mode double-rendering**: Components, `useEffect`, and callback refs render an additional time to help detect side effects
24
-
-**Validation checks**: Hooks order, prop types, deprecated API usage
25
-
-**Extended error messages**: Component stack traces for better debugging
26
-
-**Extra code paths**: Development-only warnings and diagnostics
27
-
28
-
For a virtualized table that frequently mounts and unmounts cells during scrolling, this overhead compounds quickly.
29
-
30
-
#### Browser Debugger Instrumentation
31
-
32
-
Chromium-based browsers (Chrome, Edge, Brave, etc.) instrument async operations heavily in dev mode via the V8 engine - even when DevTools is closed. Firefox and Safari have significantly lighter debugger overhead in dev mode for example.
33
-
34
-
### Recommendations
35
-
36
-
#### High Impact
37
-
38
-
1.**Use Firefox or Safari for development**: These browsers have significantly lighter debugger overhead in dev mode.
39
-
40
-
2.**Test with production builds**: When working on performance-sensitive features, test with a production build to get accurate performance metrics.
41
-
42
-
3.**Disable React Strict Mode** (temporarily): If dev mode performance is severely impacting your workflow, you can temporarily disable Strict Mode in development. Note that Strict Mode helps catch bugs, so re-enable it periodically.
43
-
44
-
4.**Memoize props that require it**: Props marked with "Must be memoized" (e.g., `columns`) need a stable reference. Define them outside the component or use `useMemo`/`useCallback` to prevent unnecessary recalculations.
45
-
46
-
#### Medium Impact
47
-
48
-
5.**Disable React DevTools extension**: The React DevTools browser extension adds performance overhead and has been observed to cause small memory leaks.
49
-
50
-
6.**Consider memoizing expensive Cell components**: If you have custom `Cell` renderers with expensive computations or deep component trees, wrapping them with `React.memo()` can help by creating render boundaries. However, avoid over-memoization - for simple cells, the overhead of memoization may outweigh the benefits.
51
-
52
-
7.**Use [direct imports](?path=/docs/knowledge-base-faq--docs#why-use-direct-imports-via-package-export-maps)**: Since tree shaking is not available for most bundlers in dev mode, use direct imports to reduce initial load.
53
-
54
-
#### Lower Impact
55
-
56
-
8.**Keep DevTools closed**: When not actively debugging, keep DevTools closed to reduce overhead from source map parsing, DOM mutation observers, and memory tracking.
57
-
58
-
9.**Deactivate UI5 Web Components animations in dev mode**: Animations cause components to recalculate multiple times. While we debounce frequent state changes, disabling animations can help.
59
-
60
-
### Summary
61
-
62
-
Dev mode slowness for virtualized components is expected behavior, not a bug. In production builds, the `AnalyticalTable` performs well. For the best development experience with heavy tables, consider using Firefox or Safari, or testing with production builds when performance is critical.
23
+
Beyond dev mode itself, general `AnalyticalTable` performance practices (memoizing `columns`, `data`, custom `Cell` components, etc.) apply equally in dev and prod — see the relevant sections in this FAQ and in the main documentation.
The following table shows a performance trace comparison from an investigation into dev mode performance ([GitHub issue #8234](https://github.com/SAP/ui5-webcomponents-react/issues/8234)). Your results may vary depending on your implementation, but the general pattern holds:
26
+
<summary>Why dev mode is slower</summary>
68
27
69
-
| Metric | Chrome DEV | Chrome PROD | Firefox DEV |
Firefox in dev mode has similar overhead to Chrome in prod mode - both are lightweight. Chromium-based browsers in dev mode are the outlier with massive V8 debugger instrumentation.
30
+
-**React's development build** adds Strict Mode double-rendering, validation checks (hooks order, prop types, deprecated APIs), extended error messages, and development-only warnings. For a virtualized table that frequently mounts and unmounts cells while scrolling, this overhead adds up.
31
+
-**Browser debugger instrumentation** in Chromium-based browsers (Chrome, Edge, Brave, etc.) instruments async operations via the V8 engine even when DevTools is closed. Firefox and Safari tend to be lighter in this regard.
75
32
76
-
For more context, see the [detailed findings comment](https://github.com/SAP/ui5-webcomponents-react/issues/8234#issuecomment-3971742068) and [production environment performance videos](https://github.com/SAP/ui5-webcomponents-react/issues/8234#issuecomment-3960465202) showing table performance (inside a complex container) on high-end, medium-range, and low-end devices.
33
+
For the original investigation and detailed findings, see [GitHub issue #8234](https://github.com/SAP/ui5-webcomponents-react/issues/8234) — note that the numbers in that issue predate the performance improvements and should be read as historical context, not current behavior.
* Allows overriding the SearchField's default placeholder text. If not set, the word "Search" in the current local language or English will be used as a placeholder.
124
124
*
125
125
* __Note:__ The placeholder is used as accessible-name of the input for screen reader support.
0 commit comments