Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Make the watcher more responsive to child changes #1873

Merged
merged 1 commit into from
Jan 28, 2017

Conversation

xzyfer
Copy link
Contributor

@xzyfer xzyfer commented Jan 28, 2017

Watching for changes on files with lots of @imports had a
significant regression in responsiveness in #1745.

The regression was caused by calling gaze.add unnecessarily. We
only need to call gaze.add on files that aren't currently being
watched.

At the time I confirmed that calling gaze.add in files that were
being watched wouldn't result in a leak or multiple events being
fired. I however assumed calling gaze.add for already watched
files would be very cheap.

Fixes #1869

@xzyfer
Copy link
Contributor Author

xzyfer commented Jan 28, 2017

This is still slower than pre #1745 but orders of magnitude faster than what it currently is. I'm sure there is significant room for improvement in sass-graph.

Watching for changes on files with lots of `@import`s had a
significant regression in responsiveness in sass#1745.

The regression was caused by calling `gaze.add` unnecessarily. We
only need to call `gaze.add` on files that aren't currently being
watched.

At the time I confirmed that calling `gaze.add` in files that were
being watched wouldn't result in a leak or multiple events being
fired. I however assumed calling `gaze.add` for already watched
files would be very cheap.

Fixes sass#1869
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant