Re: profiling and optimizing

2012-07-31 Thread Peter Otten
Rita wrote: > I recently inherented a large python process and everything is lovely. As > a learning experience I would like to optimize the code so I ran it thru > the profiler > > python -m cProfile myscript.py > > It seems majority of the time is taking in the deep copy but that seems to > co

Re: profiling and optimizing

2012-07-31 Thread Oscar Benjamin
On 31 July 2012 13:13, Rita wrote: > hello, > > I recently inherented a large python process and everything is lovely. As > a learning experience I would like to optimize the code so I ran it thru > the profiler > > python -m cProfile myscript.py > > It seems majority of the time is taking in the

Re: profiling and optimizing

2012-07-31 Thread Stefan Behnel
Rita, 31.07.2012 14:13: > I recently inherented a large python process and everything is lovely. As a > learning experience I would like to optimize the code so I ran it thru the > profiler > > python -m cProfile myscript.py > > It seems majority of the time is taking in the deep copy but that se

Re: profiling and optimizing

2012-07-31 Thread Chris Angelico
On Tue, Jul 31, 2012 at 10:13 PM, Rita wrote: > It seems majority of the time is taking in the deep copy but that seems to > come from a function (or functions) in the code. Is there a way to optimize > that? Why is the program deep-copying things? Rather than making deepcopy faster, consider doi