-
Notifications
You must be signed in to change notification settings - Fork 167
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
Replace blocking loops with async (0.6) #76
Comments
The fact that globule is synchronous also doesn't help this. Not sure how that should be rectified. My benchmarks aren't looking very optimistic in terms of startup times. |
I'm going to bump this to the next version and see if there are some things I can address in globule. A lot of the blocking loops are gone and the benchmarks are looking way better for v0.6: $ node benchmarks/startup.js
numFiles startTime
0 18
100 111
200 135
300 162
400 128
500 96
600 136
700 177
800 318
900 156
1000 332
1100 522
1200 372
1300 547
1400 408
1500 578
1600 423
1700 622
1800 478
1900 730
2000 725
done! |
@shama I don't think the number of files should effect the startTime though - that number should remain constant, right? |
Ah you're right, I just re-read gulpjs/gulp#285. I'll nextback all the things and make everything async in v0.6. |
I fixed up the startup benchmark and added a benchmark for $ node benchmarks/startup.js
.--------------------.
| startup.js |
|--------------------|
| files | ms |
|-------|------------|
| 0 | 18.37ms |
| 100 | 111.43ms |
| 200 | 147.35ms |
| 300 | 182.81ms |
| 400 | 131.62ms |
| 500 | 315.29ms |
| 600 | 227.27ms |
| 700 | 458.19ms |
| 800 | 533.91ms |
| 900 | 584.50ms |
| 1000 | 672.71ms |
| 1100 | 736.04ms |
| 1200 | 826.08ms |
| 1300 | 893.67ms |
| 1400 | 996.27ms |
| 1500 | 966.20ms |
| 1600 | 514.06ms |
| 1700 | 825.02ms |
| 1800 | 937.40ms |
| 1900 | 1,053.47ms |
| 2000 | 988.60ms |
'--------------------' $ node benchmarks/relative.js
.------------------.
| relative.js |
|------------------|
| files | ms |
|-------|----------|
| 0 | 0.56ms |
| 100 | 5.16ms |
| 200 | 8.19ms |
| 300 | 10.12ms |
| 400 | 16.28ms |
| 500 | 23.94ms |
| 600 | 28.81ms |
| 700 | 32.52ms |
| 800 | 40.08ms |
| 900 | 36.97ms |
| 1000 | 37.32ms |
| 1100 | 41.88ms |
| 1200 | 42.05ms |
| 1300 | 56.79ms |
| 1400 | 62.22ms |
| 1500 | 65.68ms |
| 1600 | 59.94ms |
| 1700 | 65.02ms |
| 1800 | 81.21ms |
| 1900 | 144.95ms |
| 2000 | 119.85ms |
'------------------' From this I'll see if I can reduce the numbers further by making everything async. |
https://github.com/shama/gaze/blob/v0.6/lib/gaze.js#L193
https://github.com/shama/gaze/blob/v0.6/lib/gaze.js#L228
https://github.com/shama/gaze/blob/v0.6/lib/gaze.js#L254
https://github.com/shama/gaze/blob/v0.6/lib/gaze.js#L271
https://github.com/shama/gaze/blob/v0.6/lib/gaze.js#L158-L164
https://github.com/shama/gaze/blob/v0.6/lib/gaze.js#L111
https://github.com/shama/gaze/blob/v0.6/lib/helper.js#L47
This will make sure the module doesn't block the main thread for extended periods of time.
Related: gulpjs/gulp#285
The text was updated successfully, but these errors were encountered: