[ 
https://issues.apache.org/jira/browse/PDFBOX-3001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14965895#comment-14965895
 ] 

John Hewson commented on PDFBOX-3001:
-------------------------------------

Yes, we could hash the path to make it shorter. But we're also seeing Windows 
users on the mailing list with this exception:

{code}
"java.util.prefs.WindowsPreferences <init> - WARNING: Could not open/create 
prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows 
RegCreateKeyEx(...) returned error code 5."
{code}

A quick Google search suggests that the only workaround is for an administrator 
to create that registry key and assign it user permissions. That's going to be 
a problem for server deployments.

Adding in the fact that Java Serialization is pretty slow, the current 
implementation of the cache isn't looking like it's good enough for production 
right now. I'm thinking that I just need to bite the bullet and implement a 
custom file serialisation to $HOME/.pdfbox.cache. I'd tried to avoid that extra 
effort but it's clearly the right technical choice. Thoughts?

> FileSystemFontProvider cache instability
> ----------------------------------------
>
>                 Key: PDFBOX-3001
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3001
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 2.0.0
>            Reporter: John Hewson
>            Assignee: John Hewson
>            Priority: Blocker
>             Fix For: 2.0.0
>
>         Attachments: md5.diff, patch, patch
>
>
> FileSystemFontProvider uses Java's Preferences API to cache font metadata, 
> however it doesn't seem to work out of the box on Windows (due to file 
> permissions) and one user on the mailing list has complained that on Linux 
> file paths with more than 80 characters can't be handed. Serializable is also 
> slow.
> It looks like Preferences wasn't a good choice here. We're going to need to 
> roll our own cache file format and save it somewhere we have write access to.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org

Reply via email to