Description
During parsing / text extraction the PDPage class' getMediaBox() and getParent() methods are accessed many times. They are currently slow because the code recalculates the results each time.
These should instead be persisted in instance fields so that they are only calculated once unless the underlying object state has changed.
I will attach a version of the file that includes the fix.