[Eric] slow problem saving file 4.2.0

Detlev Offenbach detlev at die-offenbachs.de
Tue Aug 12 18:33:38 BST 2008


On Dienstag, 12. August 2008, Linos wrote:
> Ali Gholami Rudi escribió:
> > On Aug 12 2008 12:28 +0430, Linos wrote:
> >> Ali Gholami Rudi escribió:
> >>> On Aug 12 2008 11:17 +0430, Linos wrote:
> >>>> Ali Gholami Rudi escribió:
> >>>>> Rope uses static object analysis when saving files (if it is enabled
> >>>>> in eric) but it is quite fast most of the time (at least for not very
> >>>>> large files).  Anyway you can disable it in rope's config.py (but I
> >>>>> don't know were it is located in eric).
> >>>>
> >>>> wow thanks Ali, it seems definitively a problem with rope, i have
> >>>> disabled the plugin and i have no problem now saving files, it should
> >>>> be great know how to fix rope to can use it but almost i can work with
> >>>> this eric version with rope disabled for now.
> >>>
> >>> You don't need to disable rope completely; you can probably change
> >>> rope's config.py (saved somewhere in your project tree) to::
> >>>
> >>>    prefs['automatic_soa'] = False
> >>>    prefs['validate_objectdb'] = False
> >>>
> >>> to disable that; tell me if it doesn't work.
> >>>
> >>> Anyway SOA is usually fast; Do your modules contain lots of
> >>> from-imports?  If so, maybe rope can optimize its from-imports
> >>> handling.  I've noticed this slowdown when testing it with pyopengl in
> >>> which usually thousands of names are from-import'ed in module scope.
> >>
> >> The file with this settings it is in my machine in
> >> ~/.eric4/eric4plugins/RefactoringRope/rope/base/default_config.py, i
> >> have changed the two prefs you have pointed me to false and still have
> >> the same problem, well before the changes the cpu was at 99 until i
> >> close the python project and now it gets 10~20 seconds with the cpu at
> >
> > Rope saves project information in $PROJECTROOT/.ropeproject folder in
> > projects by default (including objectdb, history, globalnames and
> > configuration).  But this folder can be changed or disabled (I don't
> > know what eric does here; you can probably find in one of the
> > dot-folder in your project root).  rope.base.default_config module
> > will be written to $PROJECTROOT/.ropeproject/config.py if it does not
> > exist.
> >
> >> 99% and eric4 gui frozen so still not usable, i have many from-imports
> >> but not thousands, the file i am testing the problem with has this
> >> lines:
> >
> > I meant thousand names; it used statements like ``from GL import *``
> >
> > :-)
> >>
> >> from collections import defaultdict
> >> from platform import system
> >> from PyQt4.QtCore import QSettings, QString, QChar, QObject, QVariant,
> >> SIGNAL, QDate, QStringList, QTimer, QTime
> >> from PyQt4.QtSql import QSqlDatabase, QSqlQuery
> >> from PyQt4.QtGui import QMessageBox
> >> import impresion, util_gui
> >> from database_mod_almacen import MetodosCompartidos
> >
> > Then, maybe it might be due to importing names from large modules?
> >
> > By the way, how many lines does this module have?
> >
> > Regards,
> > Ali
>
> The file have 1600 lines, i have found the file config.py in my project
> .ropeproject subfolder, it still have to true the parameters you have point
> me to disable but it seems be using a different name to the same property:
>
> in my .ropeproject subfolder.
> # If `True`, rope analyzes each module when it is being saved.
> prefs['automatic_soi'] = False
>
> in default_config.py in plugin subdirectory.
> # If `True`, rope analyzes each module when it is being saved.
> prefs['automatic_soa'] = False
>
> anyway i have set:
> prefs['automatic_soi'] = False
> prefs['validate_objectdb'] = False
>
> in project .ropeproject subfoder and it works great with rope activated now
> :), Thanks Ali.
>
> Regards,
> Miguel Angel.
> _______________________________________________
> Eric mailing list
> Eric at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/eric

Just to let you know, the rope menu offers an entry to edit this file 
(Configure Rope). That opens an editor with the config file contents.

If you are interested in a less resource intensive autocompletion solution, 
try the eric4 assistant plugin.

Regards,
Detlev
-- 
Detlev Offenbach
detlev at die-offenbachs.de



More information about the Eric mailing list