Browsing shares causes application hang

Hi Again,

Usually browsing other people's shares seems to be a lot quicker and better than the original client, however, if i browse a user with a huge number of shares then the application seems to hang gobbling up memory / CPU (over 450MB Memory usage & 30-40% CPU Utilisation).

A user with 60k shares seems to present no issues and I get their list back in seconds (which is fab - seriously impressive), I then tried two different users who I was never able to browse on the original client (I found 100K+ seemed the limit). They have 198K and 250k files shared respectively and both caused the application hang. I got around 1 minute or so when nothing seemed to be going on and I could continue to use SLSKQT without problems, then it suddenly stops responding. No crash report as I have to ALT-F4 or press the red-X in the corner and Windows tells me the application has become unreponsive, so no debugger intercepts I'm afraid.

Thanks,

Squizz.

This goes back to something I mentioned in my very first post regarding SoulseekQt, and it's a speech I'm bracing myself to have to give for at least a while :) One of the nicest things about the new client is a very powerful data management system I've been designing for the last few years, and only now am attempting to use in a production capacity. It lets me do some very fancy stuff relatively easily and reliably, things like reorganizing or filtering search results on the fly, assigning users into groups and using these assignments in a variety of different ways... there is almost no part of the client that hasn't been made more reliable, and easier to develop and debug by an order of magnitude. The downside is that it's not optimized for speed and it's not optimized for memory use. Normally that's not a problem, but it definitely becomes a problem when you try browsing someone with hundreds of thousands of files, or perhaps when you try sharing a large number of files yourself (I need to test for the latter). This is definitely something that has to be improved on, and I have every intention to over time, but it is a very complicated problem, and I don't have any quick and easy solutions.

This was always an issue in the old client. Well it didn't cause the app to hang, but I knew if someone had more than 100k files, it simply wasn't worth browsing. I was always able to get around this with "room searches", "buddy list searches" adding to "uploads permitted" and asking them to send a file etc. As long as there's going to be these workarounds added to slskQT at some point (don't think any of those are there atm), then it will work at least as well as the old client in this regard and better in others, so overall there's an improvement.

As this didn't work in the old client with people that share galactic amounts of files and folders, I wouldn't expect a beta version of the client to be able to do this from the first. At least its on your "to do" list!

Thanks.

Squizz

hi nir & everyone else. thanks a lot for the excellent work.

is it possible for the browsed shares be collapsed by default? i'd like to expand relevant folders by myself instead of having the full hierarchy tree exposed.
maybe this hanging/slow issue happens because all folders/subfolders are expanded by default.

Hi, thank you for the kind word. How about collapse all/expand all buttons instead? The slowdown is a separate matter, an optimization I need to work on.

collapse all/expand all buttons would suffice, yes, thanks nir.

your work is much appreciated by the mac community (we have less options for soulseek than other operating systems and the ones which exist were abandoned by their developers in alpha/beta stage).

cheers.

after testing the new 9/21/2011 release i have to say i beg to differ about the system hanging being just a question of optimization. just tried to browse a user with 78000 files and it hangs the whole app (i'm on mac osx). as soon as the the beach ball of death stops (os x waiting cursor) i have to click 'collapse all' quickly so i can browse the shares without a glitch.

this is common behavior on os x browser if you try to expand a whole hierarchy of folders in finder, it will hang for a while and i think it's more intense with a large number of subfolders rather than a long list of 2 or 3 level subfolders.

please nir, consider showing the shares collapsed by default. i think it will solve the whole problem.

I guess the Qt UI is slower on OSX than it is on Windows and Linux. It's been very slow for me but I always chalked it up to using OSX in a virtual machine. I'll add an option to start share browses in collapsed mode.

Does this make a difference for you at all? SoulseekQt-slow-share-form-fix-attempt.dmg

unfortunately no. same behavior. it hangs and soulseekqt starts using 100% cpu.
it starts only when i try to scroll down the share list.
here's two text samples taken by os x's activity monitor, when the process hangs, don't know if they're helpful to you.

http://cl.ly/091H461o2z0C0z3d3W3A
http://cl.ly/3j2i3H2J0O3u3y2t383I