wied03 / karma-opal-rspec

Opal-RSpec Karma plugin
0 stars 0 forks source link

Branch - Follow Up Issues #23

Open wied03 opened 8 years ago

wied03 commented 8 years ago

1) benchmark a single run of big app with branch approach vs. master

2) React-spinner case, we needed to run the JS dependency through sprockets, we need a test case that covers this fixed

3) In conjunction, handle unmapped assets in the preprocessor fixed

wied03 commented 8 years ago

image

wied03 commented 8 years ago

Ways to fix the speed issue:

1) On load, add all ruby files in the Opal load paths (except for the GEMs) to files via wildcards. Should simplify watching and dependencies. Should also eliminate some file list overrides. Only need to fetch the exact paths of rolled up assets and opal load paths from the rack side as metadata. The opal module system should take care of the rest. Would need to remove the 1 require at a time setup and do them all at the end since order can't be guaranteed with this approach. Could add a dummy requires file to the end of the file list when we boot up, then in the preprocessor, require all the files we've loaded. Alternatively, could use a global each time a file is preprocessed, then require all of that at the end 2) Do not call the original refresh method and thus avoid globbing twice 3) Preprocess and do metadata at the same time (modify sprockets server code to return both file contents and dependencies). Then, because refresh/other methods are customized, can add to the files collection as this happens

wied03 commented 8 years ago

1st run before cache and 2nd run:

branch - simple

39.025s, 1.780s, 2.190s 16.925s, 1.550s, 2.090s

master - simple

30.897s, 1.820s, 2.530s 15.319s, 4.680s, 4.160s

wied03 commented 8 years ago

Granular profiling to see what's causing the delay?