cocos / cocos/cocos-cli

打包的时候会在queryAssetProperty有大量的无用耗时

Open
#902 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
430
Forks
154
Avg merge
2d 4h
Merged PRs (30d)
61

Description

项目规模大的时候打包会在图集资源反向依赖查询的时候有不少浪费耗时
项目图集
187 个 PAC
会导致15438次依赖查询,内部因为是遍历的流程,进而导致1,156,877,406候选依赖查询
可以开始的时候到扫描一次,建立依赖索引进行优化

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at queryAssetProperty and the packaging flow that scans reverse dependencies for atlas resources. Reproduce the reported case with 187 PAC files, then measure dependency and candidate-query counts before and after establishing a dependency index at the beginning; done means equivalent dependency results with substantially less wasted work.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system, performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.