Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core module bundle size investigation #2000

Closed
ibgreen opened this issue Mar 6, 2024 · 0 comments
Closed

core module bundle size investigation #2000

ibgreen opened this issue Mar 6, 2024 · 0 comments

Comments

@ibgreen
Copy link
Collaborator

ibgreen commented Mar 6, 2024

Current core file structure
Current core index.ts:


Size after initial round of PRs (dist folder, not minified, comments preserved)

utils

-rw-r--r-- 1 ibgreen staff 1477 Mar 6 18:50 modules/core/dist/utils/load-file.js
-rw-r--r-- 1 ibgreen staff 823 Mar 6 18:50 modules/core/dist/utils/array-equal.js
-rw-r--r-- 1 ibgreen staff 781 Mar 6 18:50 modules/core/dist/utils/is-array.js
-rw-r--r-- 1 ibgreen staff 533 Mar 6 18:50 modules/core/dist/utils/array-utils-flat.js
-rw-r--r-- 1 ibgreen staff 558 Mar 6 18:50 modules/core/dist/utils/stats-manager.js
-rw-r--r-- 1 ibgreen staff 328 Mar 6 18:50 modules/core/dist/utils/uid.js
-rw-r--r-- 1 ibgreen staff 399 Mar 6 18:50 modules/core/dist/utils/is-object-empty.js
-rw-r--r-- 1 ibgreen staff 191 Mar 6 18:50 modules/core/dist/utils/log.js
-rw-r--r-- 1 ibgreen staff 412 Mar 6 18:50 modules/core/dist/utils/random.js


Size at start of effort

Concern raised about the size of core lib&utils directory. Most of the code is in:

  1. UniformStore and related classes,
  2. formatCompilerLog
  3. loadFile etc

lib

$ ls -Rl lib/**/*.js
-rw-r--r-- 1 ibgreen staff 5760 Mar 6 14:50 lib/uniforms/uniform-store.js
-rw-r--r-- 1 ibgreen staff 4208 Mar 6 14:50 lib/uniforms/uniform-buffer-layout.js
-rw-r--r-- 1 ibgreen staff 3382 Mar 6 14:50 lib/compiler-log/format-compiler-log.js
-rw-r--r-- 1 ibgreen staff 1973 Mar 6 14:50 lib/uniforms/uniform-block.js
-rw-r--r-- 1 ibgreen staff 1002 Mar 6 14:50 lib/compiler-log/get-shader-info.js
-rw-r--r-- 1 ibgreen staff 661 Mar 6 14:50 lib/uniforms/uniform.js
-rw-r--r-- 1 ibgreen staff 91 Mar 6 14:50 lib/compiler-log/compiler-message.js

utils

$ ls -Rl utils/*.js
-rw-r--r-- 1 ibgreen staff 2633 Mar 6 14:50 utils/load-file.js
-rw-r--r-- 1 ibgreen staff 1612 Mar 6 14:50 utils/check-props.js
-rw-r--r-- 1 ibgreen staff 1343 Mar 6 14:50 utils/deep-equal.js
-rw-r--r-- 1 ibgreen staff 1308 Mar 6 14:50 utils/format-value.js
-rw-r--r-- 1 ibgreen staff 1343 Mar 6 14:50 utils/array-utils-flat.js
-rw-r--r-- 1 ibgreen staff 823 Mar 6 14:50 utils/array-equal.js
-rw-r--r-- 1 ibgreen staff 781 Mar 6 14:50 utils/is-array.js
-rw-r--r-- 1 ibgreen staff 656 Mar 6 14:50 utils/request-animation-frame.js
-rw-r--r-- 1 ibgreen staff 699 Mar 6 14:50 utils/stub-methods.js
-rw-r--r-- 1 ibgreen staff 647 Mar 6 14:50 utils/utils.js
-rw-r--r-- 1 ibgreen staff 558 Mar 6 14:50 utils/stats-manager.js
-rw-r--r-- 1 ibgreen staff 516 Mar 6 14:50 utils/random.js
-rw-r--r-- 1 ibgreen staff 332 Mar 6 14:50 utils/assert.js
-rw-r--r-- 1 ibgreen staff 192 Mar 6 14:50 utils/cast.js
-rw-r--r-- 1 ibgreen staff 191 Mar 6 14:50 utils/log.js

dependencies

These are probably big drivers

  • probe.gl/log
  • probe.gl/stats
  • math.gl?

adapter/type-utiles etc

There is also type utilities these are not yet measured...

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

No branches or pull requests

1 participant