Git Product home page Git Product logo

Comments (10)

jfishe avatar jfishe commented on June 12, 2024 1

I haven't played with memoize, but the idea is appealing. I'd be happy to test it for you. I use Windows mostly with some WSL Ubuntu; currently using a link from .vim to my vimfiles, so far without problems.

BTW, on Windows which is spelled where.

from vim-conda.

jfishe avatar jfishe commented on June 12, 2024 1

I see a vim-conda.vim load time improvement from 1554 msec to 781 msec on Windows 10 for conda v4.5.1.

Good job.

from vim-conda.

Mistobaan avatar Mistobaan commented on June 12, 2024

Also in Linux it takes a lot of time. Any clue why?

Top 10 plugins slowing vim's startup
====================================
1        31.292   vim-conda
2        25.968   nerdtree
3        17.585   vim-textobj-entire
4        12.444   syntastic
5        10.103   vim-fugitive
6         6.218   vim-airline
7         4.610   vim-unimpaired
8         4.101   vim-gitgutter
9         2.280   python-mode
10        1.260   vim-test
====================================

from vim-conda.

cjrh avatar cjrh commented on June 12, 2024

Yes, it's because of os calls to look up things in the environment and e.g. run conda info commands and parse the output. It should be fairly easy to optimize, but I have no time for it.

from vim-conda.

ryanfreckleton avatar ryanfreckleton commented on June 12, 2024

I've got a branch that reduces this startup time to about a third of what it is by using a memoize decorator. The big culprit is running conda info --json, which is needed for default_prefix and envs.

I believe that you can get default_prefix and envs by looking at the output of which python instead of asking conda directly, but haven't had a chance to mess with it entirely.

Please advise on whether there's interest in using the memoize solution, or if I should just open a pull request once I have it working with shell tools.

from vim-conda.

ryanfreckleton avatar ryanfreckleton commented on June 12, 2024

Sorry it took me a while to get back to this: I've got a fork at https://github.com/ryanfreckleton/vim-conda/tree/develop which has the modifications to use a caching system which gives quite good speedup.

Please advise whether there's enough interest for me to put together a pull request.

from vim-conda.

cjrh avatar cjrh commented on June 12, 2024

@ryanfreckleton Sure! I've added you as a collaborator so you have commit rights. You'll prob want to put up a PR anyway to get feedback from the others.

from vim-conda.

ryanfreckleton avatar ryanfreckleton commented on June 12, 2024

Awesome, thanks! I will :)

from vim-conda.

ryanfreckleton avatar ryanfreckleton commented on June 12, 2024

Pull-request open at #24 I'd like at least one other person to look at it and someone to test it on windows before I merge.

from vim-conda.

ryanfreckleton avatar ryanfreckleton commented on June 12, 2024

Merged. Could someone on windows please test to see if performance increases?

from vim-conda.

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.