Bug 172508 - Code completion is slow when having multiple gems in different versions
Code completion is slow when having multiple gems in different versions
Product: ruby
Classification: Unclassified
Component: Rails
All All
: P3 (vote)
: 6.x
Assigned To: Erno Mononen
Depends on:
  Show dependency treegraph
Reported: 2009-09-17 18:00 UTC by ehartmann
Modified: 2009-09-21 15:15 UTC (History)
0 users

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description ehartmann 2009-09-17 18:00:55 UTC
Code completion is slow with a big gem repository. But I freezed my gems so, the code completion should not use the
whole repository but only the gems I've freezed.

So BootClassPathImpletation.java can improve the speed of completion by removing all the gems from the "classpath" if
vendor/gems is present.

Here is a small patch :

@@ -180,6 +180,10 @@
+            if ((new File(projectDirectory, "vendor" + File.separator + "gems")).exists()) {
+                gemUrls = new HashMap<String, URL>();
+		gemVersions = new HashMap<String, String>();
+	    }
             gemUrls = adjustGemsForExplicitVersion(gemUrls);
             // Add in all the vendor/ paths, if any
Comment 1 Erno Mononen 2009-09-17 19:22:40 UTC
That's a good idea - thanks a lot for the patch.
Comment 2 Erno Mononen 2009-09-18 10:35:30 UTC
Fixed in 67e6243a6f69 - I made it an option though, it is in Tools -> Misc -> Ruby -> Rails Projects. It is now off by 
default, but probably will make it be turned on by default before FCS, just need to think a bit how to handle all the 
possible cases (e.g. gems in vendor/gems, but no rails in vendor/rails, even if it might not be a common case). 

Let me know how this works for you.
Comment 3 Quality Engineering 2009-09-19 10:53:42 UTC
Integrated into 'main-golden', will be available in build *200909190201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/67e6243a6f69
User: Erno Mononen <emononen@netbeans.org>
Log: #172508: Code completion is slow when having multiple gems in different versions
Comment 4 ehartmann 2009-09-21 15:15:57 UTC
That's ok for me thanks for the quick integration !

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo