Skip to content
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

Rebuild for tests too long #1730

Closed
martypdx opened this issue Feb 18, 2015 · 2 comments
Closed

Rebuild for tests too long #1730

martypdx opened this issue Feb 18, 2015 · 2 comments

Comments

@martypdx
Copy link
Contributor

Doesn't look like much single file benefit, rebuild times are high(er) than first build. Also appears to get progressively worse longer it runs.

Single file change:

gobble: build invalidated (1 file changed). restarting
gobble: 02-6to5 done in 341ms                                                                                                 
gobble: 03-esperantoBundle done in 1462ms                                                                                     
gobble: 04-sorcery done in 1810ms                                                                                             
gobble: 18-merge done in 5ms                                                                                                  
gobble: 07-merge done in 11ms                                                                                                 
gobble: 08-bundleTests done in 1273ms                                                                                         
gobble: 09-es6transpiler done in 2099ms                                                                                       
gobble: 10-map done in 42ms                                                                                                   
gobble: 16-merge done in 66ms                                                                                                 
gobble: 17-moveTo done in 1ms                                                                                                 
gobble: 19-merge done in 5ms                                                                                                  
gobble: build completed in 7203ms. Listening for changes...

Compare to initial gobble:

~/ractive>npm start

> [email protected] start /Users/marty/ractive
> gobble

gobble: server listening on port 4567
gobble: livereload server running
gobble: 02-6to5 done in 6429ms                                                                                                
gobble: 03-esperantoBundle done in 1103ms                                                                                     
gobble: 04-sorcery done in 1344ms                                                                                             
gobble: 01-moveTo done in 2ms                                                                                                 
gobble: 05-sorcery done in 4ms                                                                                                
gobble: 18-merge done in 2ms                                                                                                  
gobble: 06-moveTo done in 0ms                                                                                                 
gobble: 07-merge done in 12ms                                                                                                 
gobble: 08-bundleTests done in 1125ms                                                                                         
gobble: 09-es6transpiler done in 6620ms                                                                                       
gobble: 10-map done in 38ms                                                                                                   
gobble: 11-moveTo done in 1ms                                                                                                 
gobble: 12-include done in 4ms                                                                                                
gobble: 13-esperanto done in 34ms                                                                                             
gobble: 14-es6transpiler done in 313ms                                                                                        
gobble: 15-moveTo done in 1ms                                                                                                 
gobble: 16-merge done in 49ms                                                                                                 
gobble: 17-moveTo done in 0ms                                                                                                 
gobble: 19-merge done in 3ms                                                                                                  
gobble: build completed in 17119ms.
@Rich-Harris
Copy link
Member

Yeah this is a pain point for me too. I tried to fix part of the problem the other day but it turned out to be a less trivial fix than I imagined.

There are (at least?) three things that need to happen:

  • Source and test files should be transpiled to ES6 in one go. At the moment, test files are bundled and then transpiled - I forget the reason. (This is also why we're using es6-transpiler for that step - 6to5 babel is excruciatingly slow with large files, but es6-transpiler has certain limitations so I'd rather remove it)
  • Esperanto needs to cache transformations where possible - Cache analysis/ast for incremental builds esperantojs/esperanto#72
  • Ditto for sorcery if that's possible (I suspect it may not be - it's not possible to state that if a file has unchanged, its sources are also unchanged, I opened an issue for it anyway Cache analysis Rich-Harris/sorcery#2). There may be other performance optimisations for sorcery (or vlq, which does the sourcemap en/decoding) that I haven't yet investigated

@Rich-Harris
Copy link
Member

Closing this - items 2 and 3 on the list above are still outstanding, but the build is now a good deal faster anyway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants