left.view frame is too slow when many files in a directory

Need help? Post your questions here.

Moderator: moderators

left.view frame is too slow when many files in a directory

Postby toxic » Sun Jun 19, 2011 4:49 pm

Hello everyone,

The problem is in the title, but let me tell you what I tried against it :
Using a ubuntu server, I got the sources of subsonic, deployed it on a tomcat, and I was amazed to see in the logs that the cache was disabled by default.
So I've set the cache value very hight, I've also set the Xmx setting of the JAVA VM high as I can spare lots of memory.
This solved one problem : once loaded, no more wait-time, even on full refresh of the page.

But in the end, the problem remains :
I have 480 files in one folder of my main raid5 array, it takes about 2 seconds for nautilus to display all of them (so ok, it's a huge directory, but listing it don't take so much time from an I/O point o f view).
But subsonic takes more than 5 hole minits to display the left frame containing the list of the files the first time.

So my guess is that somehow, the beans you're using to build this list are too big in memory that it takes so much time to write it in memory anyway when first loading the left.view.
Another problem is that those beans seems to be session-binded : opening 2 browsers, one AFTER the other, the second browser ALSO waits 5 minits for left.view to load. Why that ? Couldn't those beans be cached more permanently ?

I know this issue may not be one of the most important one since little people have so huge directories.

But is there someone working on a solution ?
Or could someone point me towards a usefull solution ? (I'm no expert at JAVA but I'm faily goot at lots of other languages, I'll find a way to do something ;))

So I'm realy more looking for someone to analyse the problem and give me some hints on how to proceed with the correction ;)

Thanks a lot, and of course, if you or I come up with a solution that d'ont fit only my needs I'll have it released opensource back to the subsonic community.
Last edited by toxic on Mon Jul 04, 2011 8:25 pm, edited 1 time in total.
toxic
 
Posts: 7
Joined: Fri Nov 27, 2009 3:49 am

Postby toxic » Tue Jun 28, 2011 5:00 pm

So noone even have a hint for me on how to speed up the rendering of left.view ?
toxic
 
Posts: 7
Joined: Fri Nov 27, 2009 3:49 am

Postby carbonrough » Tue Jun 28, 2011 5:48 pm

.... can't really help you as Windows is my platform, so FWIW and certainly in my case, found folder structure & updating the index help a great deal.

Folder structure I use is:

At the top level I have a range of alphabetically named folders ie AC, DF, GI etc.

Subfolders are arranged within the top level folders -
Artist > Album Name > track.

I set the indexing schedule to everyday at 18:00. In the Subsonic control panel i've allocated 350MB to Subsonic.

From clicking the logon button to Subsonic (ver 4.4) displaying lefthand frame is approx 6 seconds and thats a DB of over 6k of albums & over 100k tracks.

This is accessed over a GB LAN to a win xp pc with a dual core & 3.5GB RAM, the data is stored on a RAID 5 array.

Hope that helps.

Peace

CR.
User avatar
carbonrough
 
Posts: 28
Joined: Thu Oct 22, 2009 2:36 pm

Postby toxic » Tue Jun 28, 2011 8:14 pm

Thanks for your post at least !

The folder structure makes your left frame faster but that's because in the end the left frame displays little information...

Regarding the index, it's only for the search function, and it's also set to be updated daily on my computer, althought it couldn't help the left frame.

My only question is : what do you mean by this :
In the Subsonic control panel i've allocated 350MB to Subsonic.


But I guess that's gonna be the heap size of the JAVA VM, wich is set way higher on my machine.

So, at least, thanks for your concern !
I'll try to give a look at the code again to see if I can get the left frame to avoid instanciating 350 big objects each time it's loaded, or at least have those objects shared between sessions.

Anyway, my main request remains :
could any subsonic developer give me some hint on optimizing the first rendering of the left.view ?

Thanks in advance.
toxic
 
Posts: 7
Joined: Fri Nov 27, 2009 3:49 am

Postby carbonrough » Thu Jun 30, 2011 8:10 pm

.... it was of no concern to me either way just passing time.

... to your question, on a windows system SS drops a control panel in the system tray from this I can allocate RAM to SS. As you say... Heap size.

Peace

CR.
User avatar
carbonrough
 
Posts: 28
Joined: Thu Oct 22, 2009 2:36 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 8 guests