?

Log in

No account? Create an account
logjam friend filter - LogJam [entries|archive|friends|userinfo]
LogJam

[ website | LogJam ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

logjam friend filter [Mar. 14th, 2004|11:02 pm]
LogJam

logjam

[brad]
Version: 4.3.2

I've refrained from complaining about this in a while, mostly because I keep assuming I'm lagging behind from CVS and it's already been fixed, but...

Friends filters still suck! :-)

I have 52 friends and 517 friend-ofs. The current filter options are:

All Connections
Two way friends
One way friends
One way friend-ofs

None of those are what I want. I want "People I list as a friend", regardless of whether they add me back or not. So I want a superset of "one way friends" and "two way friends". You know... "friends".

Oh, and it's ghastly slow. Is something worse than O(n) going on here? When I switch it to "All Connections" my CPU usage spikes for several seconds and the UI stops painting. Do you need to tell GTK to STFU before starting list item insertion, then let it repaint when you're done?
LinkReply

Comments:
From: evan
2004-03-14 11:21 pm (UTC)
yeah, there's some terrible n^2-ish thing going on in there related to sorting.

the insertion and visual updates happen asynchronously, but the sorting happens per-insertion, and even worse the backing store is a linked list. i fought with it for a while once and coudn't fix it: ideally you'd say "stop sorting", then insert a bunch of rows, then restore the sort order, but that kept causing crashes.

i have a mostly-working prototype of an array-backed list store somewhere around here. with that, i can run qsort (merge / insertion sort) on it. it's quite fast.
(Reply) (Thread)
[User Picture]From: gaal
2004-03-14 11:27 pm (UTC)
I think you know this, but just for reference for people who don't:

* it isn't clear what a better UI for this would be (that isn't bloated)
* as a workaround you can do 'logjam console friend | grep '>'... although i just tried it now and the console command on the server seems broken?
* I think it's GTK sucking in the sort function.
(Reply) (Thread)