GithubHelp home page GithubHelp logo

Comments (11)

searls avatar searls commented on June 1, 2024

Unfortunately, I can't think of anything off-hand to help here. If I were experiencing what you are, I might start by opening bundle open jasmine-rails and sticking a debugger in the jhw adapter code to observe how and how often it's getting called and how long it's taking.

from jasmine-rails.

rymohr avatar rymohr commented on June 1, 2024

Load takes ~ 45s, tests take ~ 1s. And the load takes this long regardless of whether any files have been modified or not.

I split my code into two separate index files to try and speed things up (everything under lib and vendor goes into support.js, everything under app goes into application.js). Didn't seem to make any difference.

from jasmine-rails.

rymohr avatar rymohr commented on June 1, 2024

Thanks @searls, I'll give that a try.

from jasmine-rails.

searls avatar searls commented on June 1, 2024

In general I was pretty pessimistic about sprockets caching, so it's
very possible that I went too far and there's a configuration
available to make it cache assets for you.

from jasmine-rails.

seeflanigan avatar seeflanigan commented on June 1, 2024

Is it caching nothing? Would there be a way to find out how much time is compiling/loading CS/JS/Tests vs CSS/other assets? Might it be possible to cache everything but the JS files?

I say this without much context around Sprockets... so, with a grain of salt, as we do.

from jasmine-rails.

searls avatar searls commented on June 1, 2024

I presume based on his config that he has a lot of JS that takes a long time to compile. My guess is we're forcing a total re-compile by either having thrown sprockets into debug mode or explicitly disabling it altogether. I'm not particularly surprised by this behavior, but I bet we could do better.

from jasmine-rails.

seeflanigan avatar seeflanigan commented on June 1, 2024

"I bet we could do better"

I would "Like" that comment if GitHub supported the functionality.

from jasmine-rails.

rymohr avatar rymohr commented on June 1, 2024

Yeah, we have a very large javascript codebase (on the order of hundreds of thousands of lines altogether).

I figured the .jhw-cache folder would be a good place to sort this out. Turns out the browser version doesn't use this folder at all.

I took a look at the source for jasmine-webkit-headless and :enable_cache is true by default. Not sure why the .jhw-cache folder wouldn't be used in that case.

from jasmine-rails.

rymohr avatar rymohr commented on June 1, 2024

I'll let you guys close the issue after confirming the fix.

from jasmine-rails.

sinisterchipmunk avatar sinisterchipmunk commented on June 1, 2024

+100 -- I'm testing a WebGL application, which is not supported from the command line. I couldn't stand it any more and had to see if anyone else was experiencing this. The above commit fixed my problem.

from jasmine-rails.

seeflanigan avatar seeflanigan commented on June 1, 2024

Merged. Thanks very much!

from jasmine-rails.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.