fusee-framework 2.7.1 → 2.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +42 -24
  2. package/framework/core/h.js +632 -588
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -14,7 +14,7 @@ Fusée is a custom, high-performance fine-grained reactive JavaScript framework
14
14
 
15
15
  ---
16
16
 
17
- ## What's New in 2.7.0
17
+ ## What's New in 2.7.2
18
18
 
19
19
  - Added **Web Components**: `defineElement()` turns a fusée component into a native custom
20
20
  element with reactive props synced to attributes, shadow DOM, scoped `css` styles, native
@@ -45,14 +45,7 @@ Fusée is a custom, high-performance fine-grained reactive JavaScript framework
45
45
  JSX components use it automatically.
46
46
  - Fixed the JSX runtime: it failed to load (wrong import path), and text and `{expression}`
47
47
  children were not rendered.
48
-
49
- ## What's New in 2.6.1
50
-
51
- - Added package manager choice in the `fusee init` command and automatic installation
52
- of dependencies; (2.6.0)
53
- - Added `--install` and `--skip-install` flags to the `fusee init` command; (2.6.0)
54
- - Added `pm` flag to the `fusee init` command; (2.6.0)
55
- - Updated dev dependency for vite babel plugin. (2.6.1)
48
+ - Fixed dependency tracking in f-for for h.js
56
49
 
57
50
  ## Quick Start
58
51
 
@@ -516,21 +509,46 @@ It can be installed from the CLI after installing the SSR engine (default: not i
516
509
 
517
510
  ## Performance Benchmarks
518
511
 
519
- Framework Total Mean (Create, Update, Swap, Clear tests)
520
- Compared to other popular JS Frameworks:
521
-
522
- | Rank | Framework | Execution Time |
523
- | :----: | :--------------------- | :------------: |
524
- | **1** | **Qwik** | 117.55 ms |
525
- | **2** | <mark>**Fusée**</mark> | **120.30 ms** |
526
- | **3** | **Angular** | 121.29 ms |
527
- | **4** | **Solid** | 121.54 ms |
528
- | **5** | **Preact** | 123.18 ms |
529
- | **6** | **Vue** | 123.99 ms |
530
- | **7** | **Svelte** | 125.15 ms |
531
- | **8** | **React** | 126.12 ms |
532
- | **9** | **Mithril** | 128.35 ms |
533
- | **10** | **Lit** | 131.08 ms |
512
+ The benchmark runs the operations from
513
+ [js-framework-benchmark](https://github.com/krausest/js-framework-benchmark) on a keyed table in
514
+ headless Chromium. Each sample is read from a Chrome trace: it is the busy main-thread time from
515
+ the start of the operation until the frame that shows the result is committed (script, style,
516
+ layout and paint), with time spent idle waiting for the next frame left out. Every sample starts
517
+ from a freshly loaded page with 3 warmup runs, and the DOM is checked after each operation.
518
+ Some tests slow the CPU down, as js-framework-benchmark does.
519
+
520
+ Fusée (current `main`), median of 15 runs, AMD Ryzen 5 3500U laptop (lower is better):
521
+
522
+ | Operation | CPU slowdown | Median | ± 95% CI | Script |
523
+ | :--------------------- | :----------: | :------: | :--------: | :------: |
524
+ | Create 1,000 rows | 1x | 51.6 ms | ± 4.4 ms | 14.5 ms |
525
+ | Replace 1,000 rows | 1x | 51.0 ms | ± 4.2 ms | 20.1 ms |
526
+ | Update every 10th row | 4x | 56.9 ms | ± 4.6 ms | 5.0 ms |
527
+ | Select row | 4x | 9.0 ms | ± 0.8 ms | 2.5 ms |
528
+ | Swap 2 rows | 4x | 39.3 ms | ± 2.4 ms | 3.2 ms |
529
+ | Remove row | 2x | 25.7 ms | ± 3.6 ms | 2.6 ms |
530
+ | Create 10,000 rows | 1x | 500.4 ms | ± 208.0 ms | 159.4 ms |
531
+ | Append 1,000 rows | 1x | 47.1 ms | ± 4.1 ms | 13.4 ms |
532
+ | Clear 1,000 rows | 4x | 39.1 ms | ± 8.2 ms | 36.9 ms |
533
+
534
+ "Script" is the part of the median spent in JavaScript, including garbage collection; the rest
535
+ is the browser's style, layout and paint work.
536
+
537
+ ### Memory
538
+
539
+ JS heap after a forced garbage collection:
540
+
541
+ | Version | Fresh page | 1,000 rows | After 5× create + clear |
542
+ | :------------- | :--------: | :--------: | :---------------------: |
543
+ | Current `main` | 1.10 MB | 4.38 MB | **1.36 MB** |
544
+ | 2.7.2 | 1.10 MB | 4.41 MB | 10.81 MB |
545
+
546
+ Up to 2.7.1, `f-for` kept every row it had ever rendered reachable, so each create + clear
547
+ cycle left about 1.9 MB behind. Removed rows are now freed.
548
+
549
+ A ranking against React, Vue, Angular, Svelte, Solid, Preact, Qwik, Lit and Mithril with this
550
+ method is being re-measured. The previous ranking measured each operation plus two animation
551
+ frames, so frame timing (about 33 ms) hid most of the differences between frameworks.
534
552
 
535
553
  ### Bundle size
536
554