Skip to content

Conversation

@josephbirkner
Copy link
Collaborator

@josephbirkner josephbirkner commented Dec 10, 2025

Unfortunately, steady_clock calls in WASM translate to native JS calls, which bottlenecks simfil in the browser in extreme ways: The steady_clock calls cause a roughly 69% slowdown, maybe more, both on Chrome and Firefox. E.g. in a heavy tile render call we spend 115ms in simfil eval; 80ms of this time are spent in the emscripten steady_clock implementation!

On the Desktop, the impact is just 10%, but still worth it.

  • Query typeof Recursive: -10.91%
  • Query field id Recursive: -11.51%
  • Query field id: -10.73%

For completion (i.e. when a timeout is set), we need to consider a different implementation. For example, we could check the timeout in-between evals for individual features in the WASM workers, not for each Expr eval in simfil.


Note

Cursor Bugbot is generating a summary for commit 1fdbf28. Configure here.

@sonarqubecloud
Copy link

@github-actions
Copy link

Test Results

 1 files  ±0   1 suites  ±0   6m 53s ⏱️ -25s
86 tests ±0  86 ✅ ±0  0 💤 ±0  0 ❌ ±0 
91 runs  ±0  91 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 1fdbf28. ± Comparison against base commit b2dd48a.

@github-actions
Copy link

Package Line Rate Branch Rate Health
include.simfil 27% 11%
include.simfil.model 91% 57%
src 74% 46%
src.model 80% 45%
Summary 45% (5782 / 12752) 27% (3881 / 14317)

@josephbirkner josephbirkner merged commit 830cceb into main Dec 10, 2025
9 checks passed
@josephbirkner josephbirkner deleted the fix-timeout-performance branch December 10, 2025 15:13
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.

3 participants