On Sat, Aug 25, 2007 at 12:35:36PM +0200, strk wrote:
> On Sat, Aug 25, 2007 at 12:05:54PM +0200, Udo Giacomozzi wrote:
> > For an introduction to this discussion, see
> > http://www.gnashdev.org/wiki/index.php/NinjaProfile
> ...
> > of a local file). Maybe it would be better to implement a
> > internal buffered memory stream (sort of a read-ahead buffer for the
> > "stream" class.
>
> Yes, I think we need this.
I committed a slight optmized read_uint and an additional read_bit()
for furhter optimization and profiling options.
Now, for the cache implementation:
gnash::stream exposes a get_underlying_stream, which is currently used
by some tag readers (embedded bitmaps usually). If we can remove any
use of the underlying file, cache can be enabled at the gnash::stream level,
otherwise we're stuck in doing it in the tu_file directly.
Now, doing it in tu_file might be good, in case some tu_file implementation
have caches themselves, to avoid duplication, and could also mean we might tweak
cache size based on input channel.
Finally, we might want to implement bitcache as a separate class, which could
be used by an higher level (say, shape reading).
To recap, here are the levels:
- tu_file
- stream
- stream users
Where to cache ?
--strk;
_______________________________________________
Gnash-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnash-dev