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 345795 - Let python use per-entry data
Let python use per-entry data
Status: RESOLVED WONTFIX
Product: rhythmbox
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-06-24 07:07 UTC by James "Doc" Livingston
Modified: 2007-02-06 10:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (2.97 KB, patch)
2006-06-24 07:10 UTC, James "Doc" Livingston
none Details | Review

Description James "Doc" Livingston 2006-06-24 07:07:11 UTC
Entry types have a field for setting the amount of extra data space that is allocated to entries, so extra data can be stored. This isn't accessable from python.
Comment 1 James "Doc" Livingston 2006-06-24 07:10:49 UTC
Created attachment 67925 [details] [review]
patch

For entry types registered by python code, this adds some extra space for a pointer, and then adds a dictionary to each entry accessable via "entry.data" in Python.

It works well, however suffered the downside of creating a dictionary for each entry that data is added to. If for example the magnatune plugin added some data to each of it's (say) 5000 entried, that would be around half a meg of overhead (if the value of 100 bytes I've heard is correct).
Comment 2 James "Doc" Livingston 2006-06-24 07:20:28 UTC
If we implemented bug 330259, it could hook into that instead - which would fix the memory use and allow data sharing with the rest of the code.
Comment 3 James "Doc" Livingston 2007-02-06 10:54:12 UTC
Using a map from entry->data o the python side is actually more memory efficient, so doing that it better anyway. So there isn't really any point doing this.