On 09/07/2011 10:18 AM, Sylvain Thénault wrote: > On 07 September 09:26, Nikolaus Rath wrote: >> On 09/07/2011 04:49 AM, Sylvain Thénault wrote: >>> On 11 August 09:16, Nikolaus Rath wrote: >>>> Nikolaus Rath <[email protected]> writes: >>>>> Sandro Tosi <[email protected]> writes: >>>>>> On Fri, Aug 5, 2011 at 19:16, Nikolaus Rath <[email protected]> wrote: >>>>>>> Is there a way to find out why this specific script needs so much memory >>>>>>> and time? >>>>>> >>>>>> Probably the best thing to do is for your to attach the script here, >>>>>> so others can verify and understand what's going on. >>>>> >>>>> Alright, I isolated the culprit: >>>>> >>>>> >>>>> $ cat seemsbig.py >>>>> >>>>> from IPython.Shell import IPShellEmbed >>>>> ipshell = IPShellEmbed([]) >>>>> >>>>> $ /usr/bin/time -v pylint seemsbig.py >>>>> ************* Module seemsbig >>>>> C0111: 1: Missing docstring >>>>> C0103: 3: Invalid name "ipshell" (should match >>>>> (([A-Z_][A-Z0-9_]*)|(__.*__))$) >>>>> User time (seconds): 15.87 >>>>> Maximum resident set size (kbytes): 2083984 >>>>> >>>>> >>>>> Question: is there a way to tell pylint to completely ignore this >>>>> module? >>>> >>>> Really no one able to help? >>> >>> see pylint --ignore option >> >> Hmm, somehow I can't figure out how to use. The manpage says >> >> --ignore=<file>[,<file>...] >> Add files or directories to the blacklist. They should be >> base names, not >> paths. >> >> but >> >> pylint --ignore IPython seemsbig.py >> >> still takes just as long. What am I doing wrong? > > Hum, I may have not understood your need well. --ignore (IIRC, I never use it > :) > allows to skip some part of a package you want to analyze. For instance, > if seemsbig.py is a 'mypackage' submodule, you can analyze all 'mypackage' but > skip 'seemsbig' by typing 'pylint --ignore seemsbig.py mypackage/'
No, I think that's not quite what I want. On the highest level, all I want is have pylint run faster on the example above. I believe what's slowing down pylint there is that it's loading the entire IPython module (which is imported by seemsbig.py), so what I would like to do is tell ipython to not attempt to check any calls into IPython, so that it does not have to load that package. Any ideas are highly appreciated :-). Best, -Nikolaus -- »Time flies like an arrow, fruit flies like a Banana.« PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C _______________________________________________ Python-Projects mailing list [email protected] http://lists.logilab.org/mailman/listinfo/python-projects
