Giter VIP home page Giter VIP logo

Comments (6)

jalvesaq avatar jalvesaq commented on July 22, 2024

On Windows, Python takes about 3 seconds to load. On Linux, it's usually already loaded because there is other applications using it. However, Python is used by the plugin since 2010, so the version 110222 should already take about 3 seconds to load the first R file. It should have no delay to open additional files.

It makes no difference whether you delete old files or not. You just have more garbage on your vim directory if you don't delete the old files, but they are ignored by the plugin.

Note that the current version is 0.9.9.3.

from vim-r-plugin.

mbojan avatar mbojan commented on July 22, 2024

Thanks for the answer. I'm on Ubuntu (12.04). I upgraded to 0.9.9.3 version and the problem remains. When I open vim with R file while glimpsing at the system monitor I see vim taking 100% CPU on one of the cores for 3-4 seconds until the R file is displayed.

I'm not really into the internals of vim, is there a way to identify what which vim script/function/etc. takes so much time to execute?

from vim-r-plugin.

jalvesaq avatar jalvesaq commented on July 22, 2024

You can do this:

vim --startuptime time_file test.R

where test.R is a script that already exists. The times will be registered at time_file.

from vim-r-plugin.

mbojan avatar mbojan commented on July 22, 2024

Thanks. I checked the timings and it turned out that, for some reason, it was the loading of dbext plugin (interacting with databases) that took so much time. What is strange is that seems to be some "interaction" with recent version of vim-r-plugin: when I had old version of vim-r-plugin everything gets loaded fast, but with recent version sourcing autoloads/dbext.vim takes more than 7 seconds...

Anyway, the problem seems to be more with dbext plugin not with vim-r-plugin.

from vim-r-plugin.

jalvesaq avatar jalvesaq commented on July 22, 2024

Thanks for the feedback. Please open the issue again if necessary.

from vim-r-plugin.

claytontstanley avatar claytontstanley commented on July 22, 2024

I'm having the same issue. The delay only happens when both dbext and vim-r plugins are installed. For some reason vim-r is causing the dbext autocommand file to load when an .R file is opened, and loading that file takes a long time.

Here's my current workaround in my .vimrc:

" Handling an interaction between vim-r and dbext, where dbext files are loaded for .R files, and that loading takes a long time.
" Not using autocommands because those commands are executed after the ftplugin/dbext.vim file is loaded,
" and loading that file when the source file is an .R file is what's causing the problem.
" FIXME: Find a cleaner way to solve this problem.
if expand("%:e") ==? 'r'
let g:loaded_dbext = 1900
endif

from vim-r-plugin.

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.