Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Conversation

JiaLiPassion
Copy link
Collaborator

@JiaLiPassion JiaLiPassion commented Dec 31, 2016

  1. patch fs async methods (open, exists, write...) as macrotask, in previous patch, we use wrap,
    in my understanding, patch with wrap vs as macro task, we can both intercept schedule and invoke,
    but patch with macroTask can also have the ability to intercept cancelTask and hasTask.

  2. add test cases of fs watcher related methods. Because we already patched EventEmitter, so fs.watch, fs.watchFile, fs.unwatchFile don't need additional patch.

  3. add a generic patch macro task method in util.ts

And in original patch, we patched the fs function with wrap, now we treat them as macrotask, so fs method will make additional callback (invokeTask/scheduleTask etc..) call, it may have some performance impact, I will make some other performance demo to check it.

@JiaLiPassion
Copy link
Collaborator Author

I have make some performance test to compare the performance, basically the macrotask-patch version run the same performance with non-patch and wrap-patch version.

@mhevery mhevery merged commit e1d3240 into angular:master Jan 12, 2017
@JiaLiPassion JiaLiPassion deleted the filesystem branch January 12, 2017 01:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants