Giter Site home page Giter Site logo

Comments (5)

venantius avatar venantius commented on June 27, 2024

You're not the first person to have asked for this.

I did a bit of profiling myself - Ultra adds about 0.3-0.4s worth of dependencies, and then require-ing th e core ultra ns immediately adds about 2-2.5s on my laptop - even if we don't actually do any "work" in that ns. After a bit of further profiling it seems to boil down to the general cost of namespace loading in Ultra. One option would be to move to a more dynamic namespace loading model, so that if a given feature isn't enabled in the project map then its respective namespace and dependencies aren't loaded.

All of the benefits there would still be predicated on your project map being set up with features disabled, though - otherwise you're still following the ultimate code paths, just in a different order. The plugin uses Leiningen middleware so it would be potentially ugly to selectively enable it only for certain lein tasks (the naive implementation that occurs to me off the top of my head would be some sort of project map manipulation disabling certain features for respective tasks; the REPL middleware when testing or building an uberjar, e.g.).

I also don't know if there's a way of lazily loading features as they're needed, or whether just pushing the activation to separate threads would do the trick - I don't have the greatest insight into Leiningen's startup process.

Thoughts?

from ultra.

ikitommi avatar ikitommi commented on June 27, 2024

hi, sorry for not answering, got buried under everything else, thanks for the response and the resolution! Will continue to be a happy Ultra user :)

Tommi

from ultra.

venantius avatar venantius commented on June 27, 2024

Yeah, I think I may have accidentally screwed up the test configuration path unfortunately. The REPL stuff definitely still works but it looks like there's going to have to be an imminent 0.3.1 release to figure out a proper way of initializing tests.

from ultra.

ikitommi avatar ikitommi commented on June 27, 2024
$ time lein run -m clojure.main/main -e "(+ 1 1)"
2
lein run -m clojure.main/main -e "(+ 1 1)"  3.52s user 0.23s system 140% cpu 2.667 total

so it dropped from 3.7sec to 2.6sec --> more than 1sec off the load time (now just 0.2sec extra on my mac). Great work!!

cheers,

Tommi

from ultra.

venantius avatar venantius commented on June 27, 2024

high five

Related/unrelated: I recommend upgrading to 0.3.2 when you get a chance.

from ultra.

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.