Skip to content

perf: reduce packaged extension size

Based on !334 (closed)

This MR uses esbuild to package the whole extension. The packaging reduces the extension size and startup time.

before after improvement (reduction)
extension size (MB) (compressed) 5.86 1.65 72%
startup time (ms) 611.6 163.9 74%

Disabling source maps would reduce the startup time to 145.5 ms.

Measuring startup time

System:

  • Code - OSS: 1.62.0 (b3318bc0524af3d74034b8bb8a64df0ccf35549a)
  • OS: linux(5.14.16-arch1-1)
  • CPUs: Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz(4 x 2800)
  • Memory(System): 19.42 GB(12.62GB free)
  • Other extensions are disabled

I measured the startup time 10 times for both "before" and "after" scenarios and made a mean average from these values.

  • before(ms): 538,621,687,585,619,518,581,744,636,587
  • after(ms): 165,202,177,149,135,182,167,146,144,172
  • after(without sourcemaps): 107,126,147,152,160,174,154,140,119,176

Related to #453 (closed)

Edited by Tomas Vik (OOO back on 2024-08-12)

Merge request reports