GNOME Bugzilla – Bug 347665
replace entry-to-id map with a RhythmDBEntry property
Last modified: 2006-09-20 20:19:55 UTC
Storing the entry ID inside the entry saves a bit of memory (~200k for my 12000 entry library) when sharing is enabled, and the entry ID may be useful for other things. Perhaps we could look at adding a persistant ID too. We could possibly do this using the entry creation time, fudging it to make the IDs unique.
Created attachment 68990 [details] [review] patch entry IDs start at 1 because some daap clients ignore ID 0.
Looks good to me. Should we move the id->entry map up to Rhythmdb (e.g. a vfunc like lookup_by_location, but for ids) or leave it in the daap code?
That sounds like a good idea.
Committed this because I need it for something else I'm doing. I'll also need the other half (moving the id->entry map into rhythmdb) but I'll include that in the patch on the other bug, so I'm closing this one.
After updating to CVS with this new change, I get a crash upon attempting to play a track. gstreamer continues to play the audio but RB crashes: /tmp/rhythmbox/bin/rhythmbox sys:1: Warning: g_value_get_ulong: assertion `G_VALUE_HOLDS_ULONG (value)' failed sys:1: Warning: g_date_set_julian: assertion `g_date_valid_julian (j)' failed sys:1: Warning: g_date_get_year: assertion `g_date_valid (d)' failed sys:1: Warning: g_date_set_dmy: assertion `g_date_valid_dmy (day, m, y)' failed sys:1: Warning: g_date_get_julian: assertion `g_date_valid (d)' failed RhythmDB-ERROR **: file /home/alex/src/remote-cvs/gnome.org/rhythmbox/rhythmdb/rhythmdb.c: line 3951 (rhythmdb_entry_get_string): should not be reached aborting... Backtrace was generated from '/tmp/rhythmbox/bin//rhythmbox' Using host libthread_db library "/lib/libthread_db.so.1". `shared object read from target memory' has disappeared; keeping its symbols. [Thread debugging using libthread_db enabled] [New Thread -1208690992 (LWP 30041)] [New Thread -1330967648 (LWP 30060)] [New Thread -1273844832 (LWP 30057)] [New Thread -1288721504 (LWP 30056)] [New Thread -1313899616 (LWP 30053)] [New Thread -1305506912 (LWP 30051)] [New Thread -1273168992 (LWP 30043)] 0xffffe410 in __kernel_vsyscall ()
+ Trace 70801
Thread 1 (Thread -1208690992 (LWP 30041))
OK, was having trouble resolving which plugins it was using. Have managed a "make distclean; ./configure; make; make install" from scratch and it works again, so closing bug.
*** Bug 356959 has been marked as a duplicate of this bug. ***