Skip to content

Conversation

@ovr
Copy link
Member

@ovr ovr commented Nov 27, 2025

So, I've figured out that we load all SDKs at start of the program, more interesting, these SDKs can be unused for a lot of deployments.

The biggest problem, that it slow down the startup time (especially in the cloud, because it has overlay-fs as protection to allow only readonly operations). On another size, $1 is $1, 10mb is 10mb.

So, first I've make Azure lazy:

39mb compiled code -> 35mb (azure lazy)
27mb strings -> 22,8 mb (azure lazy)

AWS lazy:

35mb compiled code -> 32,6 (aws sdk)
22,8mb strings -> 21,6 (aws sdk)

And finally Google CS:

32,6mb compiled -> 30,1 mb (gcs)
21,6mb strings -> 19,58mb (gcs)

Before

image

1,8mb
image

1mb
image

and a lot of other strings + deps.

After

image

@github-actions github-actions bot added javascript Pull requests that update Javascript code data source driver labels Nov 27, 2025
@ovr ovr marked this pull request as ready for review November 27, 2025 11:55
@ovr ovr requested a review from a team as a code owner November 27, 2025 11:55
Copy link
Member

@KSDaemon KSDaemon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Awesome!

@codecov
Copy link

codecov bot commented Nov 27, 2025

Codecov Report

❌ Patch coverage is 0% with 63 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.57%. Comparing base (b7b6318) to head (50a85e4).
⚠️ Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
...ages/cubejs-base-driver/src/storage-fs/azure.fs.ts 0.00% 34 Missing ⚠️
...ckages/cubejs-base-driver/src/storage-fs/aws.fs.ts 0.00% 14 Missing ⚠️
...ckages/cubejs-base-driver/src/storage-fs/gcs.fs.ts 0.00% 12 Missing ⚠️
packages/cubejs-base-driver/src/BaseDriver.ts 0.00% 3 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (b7b6318) and HEAD (50a85e4). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (b7b6318) HEAD (50a85e4)
cubesql 1 0
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #10190       +/-   ##
===========================================
- Coverage   83.27%   54.57%   -28.70%     
===========================================
  Files         244      217       -27     
  Lines       74223    17018    -57205     
  Branches        0     3475     +3475     
===========================================
- Hits        61811     9288    -52523     
+ Misses      12412     7229     -5183     
- Partials        0      501      +501     
Flag Coverage Δ
cube-backend 54.57% <0.00%> (?)
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.

@ovr ovr merged commit 2986f19 into master Nov 27, 2025
73 of 75 checks passed
@ovr ovr deleted the feat/improve-memory-usage-and-speedup-with-lazy branch November 27, 2025 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data source driver javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants