ostinelli / SublimErl

An Erlang Plugin for Sublime Text 2, which enables code completion and allows you to run tests within the editor itself.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Building completion files is extremely slow

aberman opened this issue · comments

I'm on Mac OS X 10.7, 4 GB RAM, 2.16 GHz Core2Duo and a project with 8 dependencies and about 15 erlang src files takes at least 30 minutes. That renders the plug-in pretty unusable as I cannot switch between projects and have the completions available to me. Things worked better when Erlang was used to read the BEAM files instead of Python parsing the src files.

Correction, timed it, it takes 48 minutes.

I reverted back to the version which used Erlang and it takes 20 seconds to build the completion files. Huge difference.

building the completion of all the erlang libs takes around 4 minutes on this MBP, which has the same configuration of yours.

building the completion of all ejabberd takes less than 40 seconds.

@aberman, I'm glad of your input on this project but I cannot consider 'issues' on performance without me being able to reproduce whatsoever. It's the third issue where I state a simple developer concept: if i cannot reproduce it, i cannot fix it. :)

No, I understand, unfortunately, I cannot use the plugin in its current form. I have reverted back to when you used Erlang and everything is much faster.

What version of Python are you using?

BTW - When you were using Erlang, both the Erlang and current project were finished in around 20 seconds. As a result, I'd say taking 4 minutes to build the Erlang libs is extremely slow comparatively.

Personally, I don't mind if it's 2 minutes instead of 10 seconds. What you get for the difference, is the name of the parameters and you gain in usability, which is the whole point.

see issue #18

If you're used to working with autocomplete, the parsing is just something that can take time in background processes.

r.

I am used to autocomplete and understand it takes time in the background, but like I said, it shouldn't take 40+ minutes to do its magic. I am able to recreate this issue with riak_pipe (https://github.com/basho/riak_pipe). Here are the steps I took:

  1. Clone the repo
  2. rebar get-deps
  3. Open Sublime and open the riak_pipe dir
  4. Create a new project file and save it
  5. Close Sublime (I couldn't get the plugin to recognize a new project and start building the autocomplete on it)
  6. Reopen Sublime and make sure the riak_pipe project is the one that is in the current window
  7. Verify autocomplete is running on the riak_pipe project, if not, close Sublime and reopen ensuring riak_pipe is in the current window.

Let me know how long it takes for you to create the completion files based on riak_pipe.

Any word on this @ostinelli? I'm really curious if you're experiencing the same slowness with Riak Pipe as me. Thanks!

it's more than slowness. it's a regex bug that is breaking on lager.erl.

will fix that and optimize regexes for speed.

Ok cool, hopefully that fixes things for me.

this is a serious improvement for me: 233f27d

it is actually much faster than the original erlang parser of .beam files.

please confirm, and reopen the issue if necessary :)

r.

Now we're talkin! It flies now. Way faster than the erlang parser! It finishes in just a couple seconds for me for my own code and about 20 seconds for the Erlang libs. Thanks @ostinelli, sorry to have frustrated you before, but I'm glad we got it all cleared up now.

no frustration at all, just short in time ^^_

on the contrary @aberman, your contribution in reporting issues has allowed this great improvement.

so thank you,

r.