mfenniak / pyPdf

Pure-Python PDF Library; this repository is no longer maintained, please see https://github.com/knowah/PyPDF2/ insead.
https://github.com/knowah/PyPDF2/
Other
276 stars 85 forks source link

Performance increase patch #17

Closed ahall closed 13 years ago

ahall commented 13 years ago

Hi Mfennial have a look at this performance increase patch FoxyUtils applied over a year ago. This changes the _sweepIndirectReferences method to use a stack instead of recursion as recursion in python is inefficient. Also some other minor fixes. Have a look at it.

AeroNotix commented 12 years ago

Did this change get merged? I'm having a problem with the _sweepIndirectReferences right now getting stuck in a recursive loop.

ahall commented 12 years ago

No - this patch was buggy and withdrawn. After mfenniak's last recent commits pyPdf performed a lot better so we withdrew this patch. This patch also failed on about 10% of pdf's and was not worth digging further into.

AeroNotix commented 12 years ago

So any ideas for the recursive problem? I fixed it in my local branch via removing the self.stack.pop() call in _sweepIndirectReferences.