Commit e9ce8fc8 authored by James Pickard's avatar James Pickard Committed by Trevor Norris
Browse files

fs: improve performance of all stat functions



By building the fs.Stats object in JS, which is returned by all fs stat
functions, calls to v8::Object::Set() are removed. This also includes
creating all associated Date objects in JS, rather than using
v8::Date::New(). Both these changes have significant performance gains.

Note that the returned value from fs.stat changes slightly for non-POSIX
systems. Whereas before the stats object would be missing blocks and
blksize keys, it now has these keys with undefined as the value.

Signed-off-by: default avatarTrevor Norris <trev.norris@gmail.com>
parent 5d2aef17
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment