You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
startup.js test suite on my machine shows that startup time increases non-linearly. For 100 items per folder it's 1.5ms per file, while for 1000 items it's 7ms per file. I found two problems helper.objectPush method.
When adding an array of items, the method does concatenation and allocates new array. Then again a new array is allocated inside the helper.unique method.
Calling helper.unique method isn't necessary when adding a single item into the array. It's enough to call indexOf to check that the val doesn't exist in the current array.
Changes above greatly improves performance on my machine. Actually per file time reduces with growing number of files per directory.
I'll submit a PR in a minute. If the suggestions above make sense, please accept it.
Thanks,
The text was updated successfully, but these errors were encountered:
Hi,
startup.js test suite on my machine shows that startup time increases non-linearly. For 100 items per folder it's 1.5ms per file, while for 1000 items it's 7ms per file. I found two problems
helper.objectPush
method.helper.unique
method.helper.unique
method isn't necessary when adding a single item into the array. It's enough to call indexOf to check that theval
doesn't exist in the current array.Changes above greatly improves performance on my machine. Actually per file time reduces with growing number of files per directory.
I'll submit a PR in a minute. If the suggestions above make sense, please accept it.
Thanks,
The text was updated successfully, but these errors were encountered: