Code Monkey home page Code Monkey logo

Comments (6)

davidlattimore avatar davidlattimore commented on June 17, 2024

I'm guessing your config is loading some crates? Setting up sccache might save some time, but it won't make 1 as fast as 2. Using EVCXR_TMPDIR, as you were before should make 1 as fast as 2, but as you found in the other thread, has the downside that you can only have one copy of evcxr open at a time.

I don't think there's currently any ideal solution. The issue stems from there not really being a good way to share a target directory between multiple cargo workspaces.

from evcxr.

baiguoname avatar baiguoname commented on June 17, 2024

I tested the processes with both using EVCXR_TMPDIR, but the 2 is 10 times faster than 1. I'm not sure whether I described the processes clearly, I can make a gif to show the 1 and 2 if it is needed.

from evcxr.

davidlattimore avatar davidlattimore commented on June 17, 2024

What's your ~/.config/evcxr/init.evcxr like? Also, your ~/.config/evcxr/prelude.evcxr if you've got one? Mostly what I'm interested in is how many :dep commands you have and in what file. If you've got more than 1 :dep command in init.evcxr, have you tried with evcxr version 0.15.0, which was released earlier today? It included a change that would have improved startup performance for the case of having more than one :dep command in init.evcxr.

from evcxr.

baiguoname avatar baiguoname commented on June 17, 2024

I tested above with evcxr version 0.14.2(it is unpublished in that time, 3 days ago) in windows. The init.evcxr is empty, the prelude.rs is following.
image
I just know a new version has published, I'm testing the same processes with new version.

from evcxr.

davidlattimore avatar davidlattimore commented on June 17, 2024

Wow, that's quite a lot of crates. Thinking about it some more, my guess is that the difference in startup time could be rust-analyzer processing all those crates. Unfortunately there's currently no way to cache the analysis that rust-analyzer does. I'll have a look at adding some extra instrumentation to check what's taking time so that we can confirm if that's what's taking time.

from evcxr.

baiguoname avatar baiguoname commented on June 17, 2024

I test the following processes with using version 0.15.0:
(there is a test.ipynb to test, which has the first cell :clear :load_config )

  1. I start my computer(windows 11), then open vscode and open the test.ipynb file. Then I run the first cell, while recording the time of finishing running.
  2. I click the restart kernel in notebook, and waiting the vscode info (show up in the left bottom corner after I clicked the restart kernel button)Restarting kernel: Rust: Waiting for Jupyter Session to be idle to finish(it takes a few seconds). Then I run the first cell, while recording the time of finishing running.
  3. I run the first cell, while recording the time of finishing running.
    The consuming time of the above four processes.
    1 . 60 secs,
    2 . 6 secs,
    3 . 6 secs.

from evcxr.

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.