[xml-bindings]Memoization
- From: Gary Benson <gary inauspicious org>
- To: xml-bindings gnome org
- Subject: [xml-bindings]Memoization
- Date: Thu, 22 Aug 2002 12:04:26 +0100
This is one of those "resending an issue after one week if there was no
answer might be a good idea" things -- hope you don't mind ;)
-- Gary
On Thu, Aug 08, 2002 at 02:34:07AM +0100, Gary Benson wrote:
> Hiya,
>
> I have an application which uses the Python bindings, and I've been
> looking at ways to speed it up. The profiler shows that about three
> quarters of the time is spent parsing XML files and there are _a lot_ of
> repeat parsings going on.
>
> Now, it occurred to me that I could speed it up tremendously if I could
> somehow cache the parsed xmlDocs, but it isn't possible at the Python
> level since a lot of the repeat parsings are files loaded in the XSLT
> stylesheets via document(). To be truly effective I'd have to cache
> them within libxml itself. Ideally, you'd call xmlParsedDocsCache(1) to
> enable the cache, such that the normal behaviour is unchanged.
>
> I'd appreciate some insight from those who know libxml best (so probably
> Daniel :)). Is what I'm talking about possible, and if it is where
> would be a nice place to implement it. Obviously I'd like to be able to
> call xmlParsedDocsCache() from Python code, but how do I make that
> happen with the automated generator stuff? Libxml is a big bugger and
> it's hard to know where to start :)
>
> Thanks in advance,
> Gary
>
> [ gary inauspicious org ][ GnuPG 85A8F78B ][ http://inauspicious.org/ ]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]