pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martinez, Mel - 1004 - MITLL" <m.marti...@ll.mit.edu>
Subject RE: Relation between COS and PD model
Date Wed, 03 Mar 2010 14:15:17 GMT
I think that Johannes expresses a legitimate concern.  Accessing the data
from the COS model is very slow.  To get any sort of semi-decent performance
we need for the PDModel to be able to cache data.  I know it may be stated
in that link that the PD views are to be 'write-through', but that is simply
not fast enough.

For read-only and single-VC use-cases this is trivial (since the particular
PD view/control can invalidate its own cache).  But for shared COS models in
the authoring use-cases there needs to be an observer pattern in place in
order to notify views to update.

It shouldn't be too hard to introduce a simple, basic COSListener interface
to listen for change events and extend the basic COS API to be able to add

My $.02.


-----Original Message-----
From: Andreas Lehmkühler [mailto:andreas@lehmi.de] 
Sent: Wednesday, March 03, 2010 7:53 AM
To: dev@pdfbox.apache.org
Subject: Re: Relation between COS and PD model


Gesendet: Mi, 03. Mrz 2010 
Von: Johannes Koch<johannes.koch@fit.fraunhofer.de>

> Hi,
> I wonder what the intended relation between the COS and the PD model is.
> Is the COS model the actual data model and the PD classes are only views 
> on this data?

> Is the PD layer supposed to cache data (for performance issues)?
There may be some cases where data will be cached, but it wasn't intended.

> If data is changed via methods in the PD layer, how are these changes 
> propagated to other PD objects? Do we need an observer mechanism for 
> data changes?
I don't think so. Data changes should be writen to the COS model by the PD

At [1] you will find a brief description of the relation between the COS and
the PD model.

Andreas Lehmkühler

[1] http://pdfbox.apache.org/userguide/index.html

View raw message