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 90479 - reimplement search
reimplement search
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: User Interface
unspecified
Other Linux
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks: 90477
 
 
Reported: 2002-08-11 17:12 UTC by Jorn Baayen
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jorn Baayen 2002-08-11 17:12:23 UTC
Not yet implemented with new lib
Comment 1 Olivier Martin 2002-08-14 09:39:54 UTC
Here is how I see the UI:

Search for [                    ] in [All|Title|Artist|Album]

The first idea that comes up, would be to add 3 hastables in rb-node:
{ title; ref to a node }
{ artist; ref to a node }
{ album; ref to a node }

These would be filled when the property is set, exactly the same way
that the hash of locations is filled.

Advantages:
- The implementation is rather simple
- The performances should be quite good

Inconvenients:
- Sounds rather dirty ;) 
- More RAM consumption, although i'm not sure if this is really harmful
- Might slow more the startup, cuz these hash need to be filled
Comment 2 Jorn Baayen 2002-08-14 12:23:16 UTC
won't work, it'd only work if the *exact* title/artist/album whatever
was requested ;)

seth made an impl using hashes, but it ate insane amounts of memory
and was very slow on startup.
Comment 3 Olivier Martin 2002-08-14 12:38:41 UTC
Heh yeah you need the exact key X-|
But...
just looking at that page, it might do the job better:
http://developer.gnome.org/doc/API/2.0/glib/glib-relations-and-tuples.html
Comment 4 Jorn Baayen 2002-08-14 15:08:30 UTC
still requires the exact key :)
Comment 5 Olivier Martin 2002-08-17 11:38:38 UTC
Allright :) 
No magic data structure able to search on a part of the value i guess 
then. Rb needs a magic algorithm both fast and not eating memory...

I've been thinking about it and the solution of a database seems 
really the bad choice to me (no solution yet, but i know what not to 
do ;)

Having a DB would force us to get it synchronized when nodes are 
added/modified/deleted. Thus we would have to get in sync the db, the 
node model and the view.... So: more problems to come and we do not 
have amount of data...

Need to think about an smart implementation... what are your plans, 
if you have any, jorn?
Comment 6 Jorn Baayen 2002-09-07 14:01:09 UTC
Implemented, thanks Olivier!

We need to get a faster algo at some point, but this bug can be closed :D