-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Naive attempt at keeping crc cache around between runs #28
base: master
Are you sure you want to change the base?
Conversation
@evs-chris did you mean to close this? Seems worth following up |
Yeah. I don't think keeping the .cache around is the best approach. I ran with it for a little while, and it caused some weirdness here and there. After pondering a bit, I think a better approach is:
I think with this, directory transforms could possibly also opt in to crc tracking to make skipping directory transforms possible. |
I've pondered this a bit more, and when I get some breathing room (probably a month or three), I'll try roughly this:
That would open up an avenue for directory transformers to take advantage of caching if they so desired. It would also open up some possibilities for non-source-transforming code to run with input into the build process. It's also pretty easy to write an observer that just dumps its input files to an external directory for inspection. The basis for my line of thought here is that the observer is the simplest unit of action rather than the transform. Does any of that sound at all reasonable? |
It sounds more than reasonable. I ported everything to ES6 recently (because Babel has spoiled me, and my fingers can no longer bear to write code that Node understands natively) but didn't change the architecture in any fundamental way, because I wasn't sure I could see a clear path. But I think this ('the observer is the simplest unit of action') could be that path. With fast cold builds and non-transforming observer nodes, I think we go from 'broccoli, but with a nicer API and more Windows bugs' to something that genuinely fills an underserved niche. |
I needed a good distraction for an hour or two, so I thought I'd take a swing at #25. It did knock a "cold" build of Ractive from ~15 seconds to ~4 on my machine. I feel like I shouldn't make gobble keep .cache directories around, but without a bigger refactor than I'm capable of at this point, I couldn't see a way around it.
Anyways, I figure this is at least a fair proof of concept.