Completely disable eclim

317 views
Skip to first unread message

brailsmt

unread,
Feb 22, 2012, 1:34:47 PM2/22/12
to eclim-user
I have been using eclim for a while now and I generally enjoy it.
There are a few annoyances though. Foremost among them is being able
to completely disable all eclim functionality. If I issue
the :EclimDisable command, it mostly works, for java files. For xml
files, it still tries to send the XML files through xmllint, and it
will still ask which workspace to save to when opening files outside
of the workspace, /tmp for example. In addition, saving a file is
very slow. I'd like to completely enable/disable all traces of eclim
with a single command. Or, it'd be nice to use eclim only on a subset
of filetypes, ie, if I open a file /tmp, or *.txt, then there would be
no eclim functionality for that buffer, but eclim functionality for
other buffers would remain unchanged.

Is this already available?

Eric Van Dewoestine

unread,
Feb 24, 2012, 10:45:57 PM2/24/12
to eclim...@googlegroups.com
On 2012-02-22 10:34:47, brailsmt wrote:
> I have been using eclim for a while now and I generally enjoy it.
> There are a few annoyances though. Foremost among them is being able
> to completely disable all eclim functionality. If I issue
> the :EclimDisable command, it mostly works, for java files. For xml
> files, it still tries to send the XML files through xmllint,

What version of eclim are you using? It shouldn't be calling xmllint
on save and should only fall back to that if you issue an explicit
:Validate.

> and it will still ask which workspace to save to when opening files
> outside of the workspace, /tmp for example.

I can't reproduce this. Since it's prompting for a workspace I would
assume you have more than one instance of eclimd running? Can you give
me the steps you used to trigger this behavior?

> In addition, saving a file is very slow.

Every file or just some files? Does the file size matter? Saving files
should not be slow. You typically shouldn't be able to notice the
difference when saving a file with eclim installed/running or not, the
one exception being the first time eclim has to validate a file after
an eclimd startup as eclipse has to build out the ASTs, but once
that's in memory writes should not be noticeably slower.

> I'd like to completely enable/disable all traces of eclim
> with a single command.

:EclimDisable is there to completely sever vim from communicating from
eclipse. It doesn't remove all traces of eclim (autocmds will still
fire, but they shouldn't actually do anything). So if after an
:EclimDisable there is anything still getting in the way, we'll need
to see why and remedy that.

> Or, it'd be nice to use eclim only on a subset
> of filetypes, ie, if I open a file /tmp, or *.txt, then there would be
> no eclim functionality for that buffer, but eclim functionality for
> other buffers would remain unchanged.

Well that's how eclim should work by default. I don't notice that it's
there when working outside of a project.

> Is this already available?

--
eric

Michael Brailsford

unread,
May 23, 2013, 5:52:16 PM5/23/13
to eclim...@googlegroups.com
A little thread necromancy here, but I'm still having slow save issues.  The saves were so slow that I stopped using eclim altogether for most of 2012.  I just started using it again, and I'm seeing the slow saves again, hence the thread necro.  I really like the features eclim provides, though I just use a very small subset (:Validate, and :JavaImportOrganize mostly, but :JavaSearch on occassion), but the slow saves are a pain.

Here is what I notice with the saves, when the file I am editing is not part of a project in the eclipse workspace, the save will take a long time (easily 30+ seconds).  When it is taking so long, I cannot control-c the command within vim.  I have tried to see if any processes are fired off to handle the communication between vim and eclipse, but I see nothing.  After about 20-30 seconds, the UI will respond as though it has completed half the process, then it will hang for another 20-30 seconds.  During this time the gvim UI will not update.

Some version information:
:version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug 29 2012 15:59:51) 
Compiled by mbrailsford@mbrailsford
Huge version with GTK2 GUI.  Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +conceal +cryptv +cscope
+cursorbind +cursorshape +dialog_con_gui +diff +digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +float +folding -footer +fork() +gettext
-hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap -lua +menu +mksession +modify_fname +mouse +mouseshape +mouse_dec
-mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg -osfiletype +path_extra +perl +persistent_undo +postscript +printer
+profile +python -python3 +quickfix +reltime +rightleft +ruby +scrollbind +signs +smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary +tag_old_static
-tag_any_white -tcl +terminfo +termresponse +textobjects +title +toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows
+writebackup +X11 -xfontset +xim +xsmp_interact +xterm_clipboard -xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-
pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15
-I/usr/include/libpng14     -g -O2 -D_FORTIFY_SOURCE=1     -I/usr/include/ruby-1.9.1 -I/usr/include/ruby-1.9.1/i386-cygwin -DRUBY_VERSION=19
Linking: gcc   -L.       -L/usr/local/lib -o vim.exe     -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangocairo-1.0 -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lgdk_pixbuf-2.0 -lp
angoft2-1.0 -lgio-2.0 -lXext -lXfixes -lcairo -lpixman-1 -lpng15 -lxcb-shm -lxcb-render -lXrender -lxcb -lXau -lpng14 -lpango-1.0 -lfontconfig -lexpat -lfreetype -lz -lbz2 -lgmodule-2.0 -lgo
bject-2.0 -lffi -lglib-2.0 -lintl -lpcre    -lSM -lXt -lX11  -lSM -lICE  -lm -lncurses -liconv -lintl        -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base -f
stack-protector -L/usr/local/lib /usr/lib/perl5/5.14/i686-cygwin-threads-64int/auto/Win32CORE/Win32CORE.a -L/usr/lib/perl5/5.14/i686-cygwin-threads-64int/CORE -lperl -L/usr/lib/python2.6/con
fig -lpython2.6 -lruby191 -lrt 

Eclipse:
Version: Indigo Service Release 1
Build id: 20110916-0149

Eclim:
1.7.13

OS:
Windows 7 SP1

This is the content of the eclimd window in eclipse:
2013-05-22 08:45:01,121 INFO  [org.eclim.eclipse.AbstractEclimApplication] Workspace: C:/Users/mbrailsford/dev
2013-05-22 08:45:01,124 INFO  [org.eclim.eclipse.AbstractEclimApplication] Starting eclim...
2013-05-22 08:45:01,208 INFO  [org.eclim.eclipse.AbstractEclimApplication] Loading plugin org.eclim
2013-05-22 08:45:01,211 INFO  [org.eclim.eclipse.AbstractEclimApplication] Loading plugin org.eclim.core
2013-05-22 08:45:01,389 INFO  [org.eclim.plugin.core.CorePlugin] Loading eclim plugins...
2013-05-22 08:45:01,393 INFO  [org.eclim.plugin.core.CorePlugin] Loading plugin org.eclim.jdt
2013-05-22 08:45:01,406 INFO  [org.eclim.plugin.core.CorePlugin] Loading plugin org.eclim.wst
2013-05-22 08:45:01,423 INFO  [org.eclim.plugin.core.CorePlugin] Plugins loaded.
2013-05-22 08:45:01,424 INFO  [org.eclim.eclipse.AbstractEclimApplication] Loaded plugin org.eclim.core
2013-05-22 08:45:01,425 INFO  [org.eclim.eclipse.AbstractEclimApplication] Eclim Server Started on: 127.0.0.1:9091

I have vim pretty highly configured/tailored, which is the product of using it for 13-ish years.  I can provide details, if needed.  Let me know if there is any other information you need or things you want me to try.

-Michael

Eric Van Dewoestine

unread,
May 23, 2013, 11:49:53 PM5/23/13
to eclim...@googlegroups.com
The first thing to try would be to run vim + eclim with a minimal
environment:

$ vim -u NONE -U NONE --cmd \
"set nocp | sy on | filetype plugin indent on | ru plugin/eclim.vim"

If the problem still occurs there, then we should be able to rule out
any vim settings/plugins you may have.

A next step would be to enable eclim's debug logging inside of vim:

:let g:EclimLogLevel = 10

The next time you save a file eclim will print any commands it runs
and how long those commands take to run. After completion, you can run
:messages to view the full list.

Since you are on a Window's system, you may also want to look into any
anti virus software you may be running. Users in the past have
reported performance issues due to that. If you have any anti virus,
try disabling it to see if the problem goes away.
> --
> You received this message because you are subscribed to the Google Groups "eclim-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to eclim-user+...@googlegroups.com.
> To post to this group, send email to eclim...@googlegroups.com.
> Visit this group at http://groups.google.com/group/eclim-user?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
eric

Michael Brailsford

unread,
May 24, 2013, 11:00:22 AM5/24/13
to eclim...@googlegroups.com

The first thing to try would be to run vim + eclim with a minimal
environment:

  $  vim -u NONE -U NONE --cmd \
     "set nocp | sy on | filetype plugin indent on | ru plugin/eclim.vim"


The problem still occurs when I do this.

 
A next step would be to enable eclim's debug logging inside of vim:

  :let g:EclimLogLevel = 10


It seems as though the application is looking at every single project in my workspace.  I have a lot of projects/directories.  There are 198 lines like this:
(1s) system: cygpath "C:/Users/mbrailsford/dev/sandbox/dir1/dir2"

About halfway through I see this line:
(1s) system: cmd /c " "C:/eclipse/eclipse/eclim.cmd" --nailgun-port 9091 -editor vim -command projects "

I'm not sure what it is doing, but it appears that it is scanning the workspace on every save.

Eric Van Dewoestine

unread,
May 24, 2013, 11:23:56 AM5/24/13
to eclim...@googlegroups.com
On 2013-05-24 08:00:22, Michael Brailsford wrote:
>
> >
> >
> > The first thing to try would be to run vim + eclim with a minimal
> > environment:
> >
> > $ vim -u NONE -U NONE --cmd \
> > "set nocp | sy on | filetype plugin indent on | ru plugin/eclim.vim"
> >
> >
> The problem still occurs when I do this.
>
>
>
> > A next step would be to enable eclim's debug logging inside of vim:
> >
> > :let g:EclimLogLevel = 10
> >
> >
> It seems as though the application is looking at every single project in my
> workspace. I have a lot of projects/directories. There are 198 lines like
> this:
> (1s) system: cygpath "C:/Users/mbrailsford/dev/sandbox/dir1/dir2"

Ouch, yeah that would be a problem for that many projects. I'll
update the code to resolve those paths on demand rather than up front.

It's also a bit disconcerning to see that cygpath is taking a second
to return. I'll have to get a VM up and running to see if that's
normal.

> About halfway through I see this line:
> (1s) system: cmd /c " "C:/eclipse/eclipse/eclim.cmd" --nailgun-port 9091
> -editor vim -command projects "
>
> I'm not sure what it is doing, but it appears that it is scanning the
> workspace on every save.

It should only load the projects on the first save and cache that
information, so I'll run some tests to see if there is something in
the cygwin logic that is preventing it from using the cache (nothing
stands out to me from looking at the code).

I don't have a Windows VM at the moment, and I'm probably going to be
occupied this whole weekend, so it may take some time for me to
resolve this issue.

--
eric

Michael Brailsford

unread,
May 24, 2013, 11:49:29 AM5/24/13
to eclim...@googlegroups.com

It's also a bit disconcerning to see that cygpath is taking a second
to return. I'll have to get a VM up and running to see if that's
normal.

Not all the calls to cygpath took one second.  There were only 67 lines that showed it took a second, the other 130-ish lines listed the time as "(0s)".  It's likely just a case of a second to being too coarse a resolution to capture what is going on.

> About halfway through I see this line:
> (1s) system: cmd /c " "C:/eclipse/eclipse/eclim.cmd" --nailgun-port 9091
> -editor vim -command projects "
>
> I'm not sure what it is doing, but it appears that it is scanning the
> workspace on every save.

It should only load the projects on the first save and cache that
information, so I'll run some tests to see if there is something in
the cygwin logic that is preventing it from using the cache (nothing
stands out to me from looking at the code).

For the messages I posted in my previous email, I was opening a file and saving it then closing the editor.  So no caching would be involved.

Eric Van Dewoestine

unread,
May 25, 2013, 7:16:22 PM5/25/13
to eclim...@googlegroups.com
I just made a change (on both the master[1] and indigo[2] branches) which
now processes all the project paths for a workspace with a single call
to cygpath. I tested it with 200 projects and the performance seems
good on my VM. Can you give the latest code a try and see how it
performs for you?

[1] https://github.com/ervandew/eclim/commit/c3b0c5bafa39d2e91712dec0b5b338bc144fd6fe
[2] https://github.com/ervandew/eclim/commit/2608de63cf5f88c4e85e5e48d6440df702ff5d9f

--
eric

Michael Brailsford

unread,
Jun 4, 2013, 11:17:53 AM6/4/13
to eclim...@googlegroups.com
I just got around to doing this.  It looks very good, saves are much quicker now.  Thank you.


Reply all
Reply to author
Forward
0 new messages