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

Reduce package size #15595

Closed
7 tasks
pandamicro opened this issue Jun 30, 2023 · 10 comments
Closed
7 tasks

Reduce package size #15595

pandamicro opened this issue Jun 30, 2023 · 10 comments
Assignees
Labels
Env: MiNiGame Mini game platforms Env: Web Optimization Enhancement in performance, usability, stability etc P1 Must be finished in the milestone
Milestone

Comments

@pandamicro
Copy link
Contributor

pandamicro commented Jun 30, 2023

A typical 3D + physics project
企业微信截图_12452603-af67-40d4-87ac-316e7cdae506

Big modules

Other important tasks

  • Remove or reduce effects used by builtin-res-manager @jk20012001
  • Make all wasm lib pack to sub-packages: spine, bullet, physx @PPpro

Target: Reduce release package to smaller than 4MB with previous setup

@pandamicro pandamicro added P1 Must be finished in the milestone Optimization Enhancement in performance, usability, stability etc Env: MiNiGame Mini game platforms Env: Web labels Jun 30, 2023
@pandamicro pandamicro added this to the V3.8.1 milestone Jun 30, 2023
@pandamicro
Copy link
Contributor Author

Related: #10354

@iwae
Copy link
Contributor

iwae commented Jun 30, 2023

CN

  1. Bullet 物理引擎或者Spine引擎的WASM包可以放子包,可以选择性加载
  2. 部分模块可以使用gzip压缩延迟加载(如材质)
  3. 支持材质剔除,部分游戏可能用自己的光照模型(比如blinn-phong),支持剔除standard材质,只保留基本的global ubo fog planarshadow这些chunk
  4. 部分组件继续细分可以剔除,比如slider,editbox,graphics ,controller,灯光(不包含基础平行光)等等(最好提供大的分类)
  5. 粒子支持 CPU粒子或 GPU粒子 的分别剔除
  6. 动画图目前太大,功能太多了,能否做基础动画图,其他镶嵌,变种的可以剔除

EN

  1. The WASM files for Bullet physics engine or Spine engine can be placed in subpackages.
  2. Some modules can use gzip compression for deferred loading (such as materials).
  3. Supports material culling, some games may use their own lighting models (such as Blinn-Phong), support for culling standard materials, and only retain basic global UBO chunks such as fog, planar shadow, shadow map etc.
  4. Some components can be further subdivided and culled, such as sliders, edit boxes, graphics, controllers, lights (excluding basic directional lights), and so on (it is best to provide large categories).
  5. Particle supports culling CPU particles and GPU particles separately.
  6. The animation graph is currently too large and has too many features, can we create a basic animation atlas and cull other embedded and variant animations?

@PPpro
Copy link
Contributor

PPpro commented Jul 6, 2023

done here #15493

we don't support phsx wasm subpackage, because it's too big

@PPpro PPpro moved this from Todo to Done in PAL & Infrastructure Jul 6, 2023
@Ronsku
Copy link

Ronsku commented Aug 6, 2023

Update from CC 3.8.0, vs latest CC2 version 2.4.11.

Very Stripped 2D Build in 3.8.0:
image

I think things were moved out from the bundle, but the bundle is still relatively the same size or slightly bigger?
Compared to version 3.7.2:
3.7.2: CC bundle is 1,806 KB
3.8.0: CC bundle is 1,825 KB while it looks like Spine has even been stripped out and adds an additional 701 KB?!
image

2.4.11 while CC2 stays at 991 KB

Here are the statistics of just the CC bundle between CC2 and CC3, without taking into consideration the 701 KB Spine file.

image

I'm getting really worried getting stuck in legacy CC2 forever or having to look for alternatives, which I really wouldn't like to do 😨?!

@shrinktofit shrinktofit modified the milestones: V3.8.1, V3.9.0 Aug 9, 2023
@jk20012001
Copy link
Contributor

jk20012001 commented Aug 23, 2023

FXAA with default pipeline
#16075

@minggo
Copy link
Contributor

minggo commented Aug 5, 2024

We are keeping reducing package size. Will do it in many issues, so close this one.

@minggo minggo closed this as completed Aug 5, 2024
@Ronsku
Copy link

Ronsku commented Aug 5, 2024

We are keeping reducing package size. Will do it in many issues, so close this one.

Okay, which are the different issues linked to reducing the package size?

I would love to upgrade our CC2 projects to CC3, but size and initial load times are too high for making faster loading games on the web, so this is critical for making CC3 work.

@minggo
Copy link
Contributor

minggo commented Aug 5, 2024

Indeed, there can not have an issue to collect all PR to reduce package size.

@Ronsku
Copy link

Ronsku commented Aug 25, 2024

Indeed, there can not have an issue to collect all PR to reduce package size.

Which new issues have been created to replace this one? So that I can follow the progress of them.

@iwae
Copy link
Contributor

iwae commented Aug 26, 2024

Indeed, there can not have an issue to collect all PR to reduce package size.

Which new issues have been created to replace this one? So that I can follow the progress of them.

We have collected a lot feedback from developers, you can replay in this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Env: MiNiGame Mini game platforms Env: Web Optimization Enhancement in performance, usability, stability etc P1 Must be finished in the milestone
Projects
None yet
Development

No branches or pull requests

10 participants