duojs / duo

A next-generation package manager for the front-end
3.42k stars 118 forks source link

Removing statSync call from File#modified() #473

Closed dominicbarnes closed 9 years ago

dominicbarnes commented 9 years ago

When profiling duo to try and optimize it, it came up that the statSync call used by File#modified() was causing a slowdown. (sync methods block the event loop, so it was interfering with other async stuff indirectly by blocking the parallelism)

This is based on #472 since I used it to detect other usages of sync methods. To make it easier to see the exact change here, just view b9aa463.

calvinfo commented 9 years ago

Awwwww yeeaaaaa!

stephenmathieson commented 9 years ago

+1 for removing the sync stuff

don't care either way about the lint stuff

matthewmueller commented 9 years ago

oh man, that makes sense. +1 to these changes