Skip to content

TIKA-2447 reduce memory consumption of PSDParser - #200

Closed
bjrke wants to merge 1 commit into
apache:masterfrom
justsocialapps:master
Closed

bjrke wants to merge 1 commit into
apache:masterfrom
justsocialapps:master

Conversation

@bjrke

@bjrke bjrke commented Aug 24, 2017

Copy link
Copy Markdown

No description provided.

@Gagravarr

Copy link
Copy Markdown
Contributor

Thanks for this! Unfortunately it breaks the unit tests as it stands, because stream.skip may not skip the whole amount... I've committed a slightly modified version

@Gagravarr Gagravarr closed this Aug 24, 2017
@bjrke

bjrke commented Aug 24, 2017

Copy link
Copy Markdown
Author

Thanks for this fast apply of that patch. You should also close the jira ticket.

@bjrke

bjrke commented Aug 24, 2017

Copy link
Copy Markdown
Author

I've tested the code. To protect us against too large files we crop them.
This now causes the file to unlimeted skip, because it can't skip behind the cropped end of the file.
This is caused by the implementation of skipFully which tries to skip if even there is nothing to skip.
Unlike read, skip will not return -1 if EOF is reached!

@Gagravarr

Copy link
Copy Markdown
Contributor

Any thoughts on how we should patch skipFully to handle it? Maybe check if skip returns 0, then call a read to see if it's -1?

@bjrke

bjrke commented Aug 25, 2017

Copy link
Copy Markdown
Author

there is a bug report in poi: https://bz.apache.org/bugzilla/show_bug.cgi?id=61294

@bjrke

bjrke commented Aug 25, 2017

Copy link
Copy Markdown
Author

and it is fixed with apache/poi@c7db66a

@tballison

Copy link
Copy Markdown
Contributor

@Gagravarr thank you for taking this! @bjrke thank you for opening this and submitting a PR! I'm just back from vacation...sorry for not contributing, is there anything that needs to be done on this?

@bjrke

bjrke commented Aug 28, 2017

Copy link
Copy Markdown
Author

no, only release of a new version of poi and tika :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants