After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 88828 - XML backend should use the same cache for multiple sources with the same root directory
XML backend should use the same cache for multiple sources with the same root...
Status: RESOLVED FIXED
Product: GConf
Classification: Deprecated
Component: XML backend
CVS HEAD
Other All
: High normal
: ---
Assigned To: GConf Maintainers
Luis Villa
Depends on:
Blocks:
 
 
Reported: 2002-07-23 02:53 UTC by Mark McLoughlin
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
xml backend using same cache for multiple sources with same root directory (6.32 KB, patch)
2002-07-23 02:54 UTC, Mark McLoughlin
none Details | Review

Description Mark McLoughlin 2002-07-23 02:53:14 UTC
Subject says it all really ...

I'll attach a patch
Comment 1 Mark McLoughlin 2002-07-23 02:54:17 UTC
Created attachment 10011 [details] [review]
xml backend using same cache for multiple sources with same root directory
Comment 2 Havoc Pennington 2003-03-06 04:21:35 UTC
This looks fine to apply, if you still care. (Seeing several of your
patches in here from a long time ago makes me feel a bit guilty...)
Comment 3 Mark McLoughlin 2003-03-06 04:33:01 UTC
Heh, its the other patch I care more about :-)

I'll commit this, but do you want it just on HEAD or on gnome-2-2 as
well? Also, I haven't looked at the markup backend but it would
probably need a similar patch right ?
Comment 4 Havoc Pennington 2003-03-06 04:37:58 UTC
I'd say head only, this is just an optimization not a bugfix, 
and it might break something. It does appear markup backend needs
the same fix.

Comment 5 Mark McLoughlin 2003-03-06 04:46:18 UTC
To be honest, I've forgotten the details. But it definetly wasn't just
an optimisation. I think it was that the cache's get out of sync if
you are editing two different composite databases.
Comment 6 Havoc Pennington 2003-03-06 04:53:06 UTC
OK. I think it's safe to say composite (or non-default) databases 
don't work at all on stable branch, in fact I think gconf prints 
a warning if you create one, or used to. The larger patch for 
composite databases seems pretty clearly like it's a HEAD-only 
patch.
Comment 7 Mark McLoughlin 2003-03-13 20:26:25 UTC
2003-03-14  Mark McLoughlin  <mark@skynet.ie>
 
        Basically the same patch as the previous one .. but
        for the markup backend.
 
        * backends/markup-backend.c:
        (resolve_address): update.
        (clear_cache): use markup_tree_rebuild() instead of
        re-creating the tree.
        (ms_new): remove the read_only arg and s/markup_tree_new/
        markup_tree_get/
        (ms_destroy): s/markup_tree_free/markup_tree_unref/
 
        * backends/markup-tree.[ch]:
        (markup_tree_get), (markup_tree_unref): rename these
        from new()/free() and share caches for sources with
        the same root directory.
        (markup_tree_rebuild): impl.
        (markup_dir_needs_sync): we don't keep the read_only
        flag per-tree anymore so don't check it here.
 
2002-07-16  Mark McLoughlin  <mark@skynet.ie>
 
        Use the same cache for multiple sources with the same
        root directory.
 
        * backends/xml-cache.[ch]:
        (cache_get): rename from cache_new and return and existing
        cache for this root dir if one exists. Also use g_free
        as a key destroy handler for the nonexistant hash instead
        of doing it manually.
        (cache_unref): rename from cache_destroy and only destroy
        when refcount drops to zero.
        (cache_set_nonexistent), (cache_destroy_nonexistant_foreach):
        don't free the key here.
 
        * backends/xml-backend.c:
        (xs_new): s/cache_new/cache_get/
        (xs_destroy): s/cache_destroy/cache_unref/.