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

Performance tuning for getProjectFiles #612

Merged

Conversation

takanakahiko
Copy link
Contributor

Relate #610

In getProjectFiles, the process of checking for file name conflicts is very heavy.
However, this process was placed before filtering files using ignore.
That is, this process was applied to a large number of files (for example, files in node_modules), and spend long time.

Therefore, Ie speeded up by replacing the processing order.
The process of checking for file name conflicts is running before filtering words by ignore.

  • npm run test succeeds.
  • npm run lint succeeds.
  • Appropriate changes to README are included in PR.

@grant
Copy link
Contributor

grant commented May 13, 2019

Thanks @takanakahiko.

Can you test the before PR and after PR to ensure this change is an improvement?

Run time clasp push with your project. Example:

time clasp push
└─ appsscript.json
Pushed 1 file.

real	0m3.354s
user	0m1.580s
sys	0m0.263s

@takanakahiko
Copy link
Contributor Author

takanakahiko commented May 13, 2019

@grant OK!
The results are listed below.

# Before
❯ time clasp push
└─ appsscript.json
└─ src/index.ts
└─ src/sheet.service.ts
└─ src/util.ts
Pushed 4 files.
clasp push  4.03s user 0.59s system 79% cpu 5.818 total

# After
❯ time clasp push
└─ appsscript.json
└─ src/index.ts
└─ src/sheet.service.ts
└─ src/util.ts
Pushed 4 files.
clasp push  1.96s user 0.58s system 44% cpu 5.776 total


@grant grant merged commit fb6df2d into google:master May 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants