Skip to content

Conversation

@KSDaemon
Copy link
Member

@KSDaemon KSDaemon commented Nov 17, 2025

This PR adds top-level (at server core) shared cache for model compilation. This should significantly improve the performance for multi-tenant environments.

Probably, even in multi-tenant envs there not all models (cubes) are tenant-specific. There are always some shared cubes that are the same for all tenants (e.g., some dictionaries). This PR brings top-level cache that is shared across all tenants, so if the model file is not changed (after transpilation/compilation), it will be reused for all tenants.

The core change is in this commit. While other changes are related to moving some source files to typescsript.

Check List

  • Tests have been run in packages where changes have been made, if available
  • Linter has been run for changed code
  • Tests for the changes have been added if not covered yet

@github-actions github-actions bot added the javascript Pull requests that update Javascript code label Nov 17, 2025
@codecov
Copy link

codecov bot commented Nov 17, 2025

Codecov Report

❌ Patch coverage is 25.45455% with 82 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.61%. Comparing base (d3dac18) to head (324c2f4).
⚠️ Report is 12 commits behind head on master.

Files with missing lines Patch % Lines
packages/cubejs-server-core/src/core/logger.ts 17.85% 44 Missing and 2 partials ⚠️
...ackages/cubejs-server-core/src/core/CompilerApi.ts 34.88% 27 Missing and 1 partial ⚠️
packages/cubejs-server-core/src/core/DevServer.ts 0.00% 4 Missing ⚠️
...js-schema-compiler/src/compiler/PrepareCompiler.ts 25.00% 3 Missing ⚠️
...cubejs-schema-compiler/src/compiler/CubeSymbols.ts 0.00% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (d3dac18) and HEAD (324c2f4). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (d3dac18) HEAD (324c2f4)
cubesql 1 0
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #10144       +/-   ##
===========================================
- Coverage   83.28%   54.61%   -28.68%     
===========================================
  Files         244      213       -31     
  Lines       74180    16937    -57243     
  Branches        0     3438     +3438     
===========================================
- Hits        61782     9250    -52532     
+ Misses      12398     7198     -5200     
- Partials        0      489      +489     
Flag Coverage Δ
cube-backend 54.61% <25.45%> (?)
cubesql ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@KSDaemon KSDaemon marked this pull request as ready for review November 17, 2025 11:48
@KSDaemon KSDaemon requested review from a team as code owners November 17, 2025 11:48
@KSDaemon KSDaemon force-pushed the feat/compile-shared-cache branch from 3162ea8 to 324c2f4 Compare November 18, 2025 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants