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

6.0 Performance Regression #317

Closed
LPGhatguy opened this issue Apr 29, 2020 · 1 comment
Closed

6.0 Performance Regression #317

LPGhatguy opened this issue Apr 29, 2020 · 1 comment
Labels
regression This bug wasn't a bug in a previous version of Rojo version: 6

Comments

@LPGhatguy
Copy link
Contributor

LPGhatguy commented Apr 29, 2020

A Roblox engineer working on an internal project recently reported a pretty bad performance regression for rojo build for version 6.0 vs 0.5.4 on macOS:

0.5.4:

real    0m0.071s
user    0m0.035s
sys     0m0.030s

6.0.0-rc.1

real    0m3.923s
user    0m0.852s
sys     0m2.858s

This is a 55x performance regression, which is incredibly bad. On my Windows machine with the same project, I had these performance numbers:

0.5.4:

real    0m0.134s
user    0m0.000s
sys     0m0.015s

6.0.0-rc.1:

real    0m0.377s
user    0m0.000s
sys     0m0.015s

0.5.4 is around twice as slow on my machine, but 6.0.0-rc.1 is around ten times faster on my machine.

After bisecting and probing the code a little bit, I narrowed this issue down to #297. Two specific issues I believe we regressed on:

  1. rojo build now watches all files, instead of only happening when running rojo serve. We can introduce this as a configurable feature of the VFS again.
  2. Removal of the file cache means that fs::metadata is invoked several times for each path. While repeated reads are not a factor for performance when building, it may be a good idea to cache more.

I tested this mitigations in the sketchy-perf-changes branch by removing file watching completely and implementing a permanent metadata cache. Both of these changes break serve, but I was able to print 6.0.0-rc.1 in line with the performance numbers for 0.5.4 on my machine.

When running the patched binary on the original reporter's machine, however, performance is around 2x worse than 0.5.4 still:

real    0m0.165s
user    0m0.050s
sys     0m0.059s

This warrants some serious digging I think.

@LPGhatguy LPGhatguy added regression This bug wasn't a bug in a previous version of Rojo version: 6 labels Apr 29, 2020
@LPGhatguy LPGhatguy added this to the Rojo 6 Blockers milestone Apr 29, 2020
@LPGhatguy
Copy link
Contributor Author

Fixed after merging #324 and introducing 782b054!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression This bug wasn't a bug in a previous version of Rojo version: 6
Projects
None yet
Development

No branches or pull requests

1 participant