froggy 0 Posted July 9, 2014 Share Posted July 9, 2014 (edited) Hi there,Love mediabrowser, love this xbmc plugin I use mysql databased for my xbmc install, btu am looking at consolidating all media into media browser for good local/remote viewing of media.However I am finding browsing slow, playback is fine.I find going into the library takes about 10 seconds. Going into a show takes a few seconds only but every time I go out of a show and return to the list of shows it takes around 10 seconds each time, making things seem sluggish. There is a buffering notification then things show up. It doesnt seem to be anything to do with images as even on list view this delay is seem. I am running on a local network with good speeds.Is this behaviour normal? does the mediabrowser library have to be polled on each view? Are these speeds normal? viewing the library via http seems pretty fast, I'm not sure what could be causing this slowness if it is not to be expected.Thanks for any help. I have gotten everything working as I want, but if browsing up and down the library seems very sluggish. It occurs on differnt machines of varing power (all with good enough speeds and power not for this to be an issue per say). Edited July 10, 2014 by froggy Link to comment Share on other sites More sharing options...
xnappo 1592 Posted July 10, 2014 Share Posted July 10, 2014 (edited) That is way too slow for a PC. Something weird is going on. Can you turn on level 1 debug logging in the xbmb3c addon, and logging on the MB3 server and post both logs? At one point when I was using software RAID I had problems like that... Edited July 10, 2014 by xnappo 1 Link to comment Share on other sites More sharing options...
froggy 0 Posted July 10, 2014 Author Share Posted July 10, 2014 Thanks for the help Here is the server log : http://pastebin.com/HkuBacdP I couldnt find any xbmb3c logs so I assume it goes into xbmc.log? here it is: http://pastebin.com/XH6ZvA4V I went in and out of the tv shows , it took around around 8 seconds. movies are like 20seconds. I wouldnt mind this happening once, but everytime? Ideally i'd want maybe 3 seconds max, as with mysql it is near instant. Am I being unrealistic? Oh one other thing. I have moved mediabrowser to E:\Server, i like to keep things that serve organised. But that shoildnt break if http serves fine and fast no? cheers fôr the help! Link to comment Share on other sites More sharing options...
xnappo 1592 Posted July 10, 2014 Share Posted July 10, 2014 (edited) Your expectations are not unrealistic - something is going on here. How many movies do you have? Sorry to ask for more data, but can you turn OFF the two logs I asked you to turn on, then turn on 'performance profiling' in the XBMB3C settings? The log for that goes to: XBMC\userdata\addon_data\plugin.video.xbmb3c\profile_cumulative* A couple more things: 1. Do you see the same speed going into Video->AddOns->[TV collection Name] and Video->AddOns->All TV? How about [Movie collection name] vs. 'All Movies'? 2. What version of XBMB3C are you running? Thanks, xnappo [EDIT] One more thing to try - turn off 'Auto Enter Single Item Folders' and see if that makes a big difference. Edited July 10, 2014 by xnappo 1 Link to comment Share on other sites More sharing options...
snazy2000 342 Posted July 10, 2014 Share Posted July 10, 2014 I found that it was pretty slow when I tried with latest version. Thought I had just setup wrong. I'll get some logs together Sent from my HTC One using Tapatalk 1 Link to comment Share on other sites More sharing options...
froggy 0 Posted July 10, 2014 Author Share Posted July 10, 2014 (edited) Thanks for your speedy replies guys, I'm often a lurker on these things its really nice to get such help when asked for. Edited July 10, 2014 by froggy Link to comment Share on other sites More sharing options...
xnappo 1592 Posted July 10, 2014 Share Posted July 10, 2014 I have around 500 movies, and it take 2.8 seconds if I get a cache hit (nothing has changed) or 4.2 seconds if there has been a change. There was a change to TV shows *fairly* recently with 'auto enter' and from your log I think you have a lot of shows with just one season. That setting is here: I think I know a way to make that bit faster if it is the problem there. xnappo 1 Link to comment Share on other sites More sharing options...
froggy 0 Posted July 10, 2014 Author Share Posted July 10, 2014 Hi there,That is a LOT faster Movies takes about 4 seconds. I think it is a performance hit on my sql but I like mb3 so this might be acceptable!Will however the lag get larger with larger libaries? The server seems to perform well.Could we have a) some sort of intelligent caching, only changing when database is updated I am experimenting with openvpn to reach server when i'm outside due to security issues with login and media streams. But its as often it seems a bit of nightmare re: lan routing, are these things in the works?But hey I think that this solves my problem Link to comment Share on other sites More sharing options...
xnappo 1592 Posted July 10, 2014 Share Posted July 10, 2014 (edited) It is already intelligent caching It only hits the server when things change. But it has to process the JSON data using Python every time where as the native library is straight C++. I am confused though - the Auto enter sped up MOVIES? It should not have made any difference there, only to TV. xnappo Edited July 10, 2014 by xnappo 1 Link to comment Share on other sites More sharing options...
froggy 0 Posted July 10, 2014 Author Share Posted July 10, 2014 Hmm I'm doing these tests on my main machine rather than a tablet I was on last night. But I've played around with movies and they were very laggy (20 seconds ) on tablet and slow on other machines and they seem to be faster.It only hits the server when things change , awesome idea. It's a shame the json processing takes so much time (Im a senior web dev so I am familiar with these kind of stuffs). Is there anyway that the processing could be caches to a file that has been processed and just read to spped things up? Hmm json is a lightweight protocol so maybe it wouldnt help.Is that why mysql is faster? because thigns are processed by xbmc native c++ rather than a slower way? Is there anyway to improve on this? Link to comment Share on other sites More sharing options...
xnappo 1592 Posted July 10, 2014 Share Posted July 10, 2014 (edited) Senior web dev eh? Well take a look a the code then! There are many reasons the native XBMC/SQL is faster, being straight C is one reason, but in general it can integrate more tightly with the core code. We are using an add-on system so can't do fancy stuff like knowing in real-time what needs to be displayed - ie 'lazy loading'. Personally it is well worth 2-4 seconds - but 10 seconds would be annoying. Of course, in 'real life' I almost always use 'Recently Added' for movies anyway. There are two options for further speed up I have thought of (@, thoughts here appreciated): 1. Use a background process to try to keep the cache updated even when the user is not actively browsing - ie increase chance of cache hits 2. Save the cache as some sort of native XBMC list instead of saving the JSON data. I don't know if this is possible though. Please post some profile data though so we can see where you time hit really is. xnappo Edited July 10, 2014 by xnappo Link to comment Share on other sites More sharing options...
froggy 0 Posted July 10, 2014 Author Share Posted July 10, 2014 (edited) Hehe,Been doing it so long it's hard to motivate myself to do extra projects because 'm working all the time on stuff and i tend to not want to go through others code from scratch.. But hey i'm going to set up a web proxy and maybe do my own encrption, so who knows I might even get to this.. ah at some point.I've been looking at the data and the hit times are microseconds of a low magnitude, so the data being served is lagging because of processing.What I may do is get everything sorted out again so everything is seemless and then I will look into what the code is doing. I would say don't hold your breath, but if I do improve matters I will share.Thanks for your hard work, I've bought the app and chucked you a donation as a thank you Edited July 10, 2014 by froggy Link to comment Share on other sites More sharing options...
froggy 0 Posted July 10, 2014 Author Share Posted July 10, 2014 *ack* , just tried this on my proper xmbc box, which is a 1.8ghz ION box, and this solution is not showing any improvement THe box I was testing the change on is a 3ghz i3... Link to comment Share on other sites More sharing options...
xnappo 1592 Posted July 10, 2014 Share Posted July 10, 2014 Need that performance log... xnappo Link to comment Share on other sites More sharing options...
froggy 0 Posted July 10, 2014 Author Share Posted July 10, 2014 hokay , profiling is it?The main xbmc box is a openelec distro would that make a differnce? The xbmc on my main pc is performing well now. Link to comment Share on other sites More sharing options...
xnappo 1592 Posted July 10, 2014 Share Posted July 10, 2014 (edited) No, it should be fine. You might try the alternate JSON engine. I am running on a OpenElec with a Celeron and see no difference. GigE local network. Yes - profiling. xnappo Edited July 10, 2014 by xnappo Link to comment Share on other sites More sharing options...
froggy 0 Posted July 10, 2014 Author Share Posted July 10, 2014 Okay, here it ishttp://pastebin.com/FkUyM09WThis is a fresh openelec install , with nothing else added but the xbmb3c repo, xbm3c and the modded mg5 skin. But performance is the same on the confluence skin. Link to comment Share on other sites More sharing options...
xnappo 1592 Posted July 10, 2014 Share Posted July 10, 2014 I think you missed this from an earlier post: Profile data is here: XBMC\userdata\addon_data\plugin.video.xbmb3c\profile_cumulative* Link to comment Share on other sites More sharing options...
froggy 0 Posted July 10, 2014 Author Share Posted July 10, 2014 Hi there,Opps sorry ! Here is is :http://pastebin.com/NiqKMmEMI've been fiddling with it but no progress, the loading bar ticks up pretty fast but at 124 series each time it takes like 5 seconds each time ...I wonder if I should put windows on it and use windows xbmc? But that seems nonsensical. The machine itself has only a 100mps card on a gbit network, but that is plenty fast enuogh to stream big movies fast , so it shounldnt be the issue ... Link to comment Share on other sites More sharing options...
xnappo 1592 Posted July 10, 2014 Share Posted July 10, 2014 (edited) No - again something is weird here I run the same config(well, NUC vs. ION, but close) and this many TV shows is almost instant. You are sure you have 'Auto Enter Single Item Folders' OFF on the OpenElec box? But.. I don't see anything obvious in the profile - to me it looks fairly balanced in the various stages. @ ? xnappo Edited July 10, 2014 by xnappo Link to comment Share on other sites More sharing options...
froggy 0 Posted July 10, 2014 Author Share Posted July 10, 2014 Hi there yup.It IS wierd, the suggested fix works well on PC, instantaneous.I have tried it on a decent 1.8ghz tablet over wifi however running the same xbmc system and browsing buffers at around 3 second for tv shows. better than openelec. But it seems from this performance is markedly related to cpu. Is that going to be the case?Openelec box is only 1.8ghz too, but as its running a light weight openelec distro surely it should be snappy? Link to comment Share on other sites More sharing options...
froggy 0 Posted July 10, 2014 Author Share Posted July 10, 2014 Tch further to this , I think I must not have looked at this properly. On the 3ghz machine even with that setting ON , it works instantaneously.The lag must purely be related to cpu. What may I ask is the speed of yuor open elec box. 1.8ghz isnt fast, but surely should be enough for text processing ? Link to comment Share on other sites More sharing options...
froggy 0 Posted July 10, 2014 Author Share Posted July 10, 2014 Hmm well that at least gives me hope . What I can do is revert , but keep the add on for testing access times. I really want this to work , mb3 handles the library so much better than xbmc :sCan we rule out the network from what we've seen? The main machine has gbit , but the others have wifi/100mb on the openelec. Could it be the network?I have tested fresh install on main pc, tablet pc and open elec and added xbmb3c from repo and have latests server. It couldnt be that I moved it to a non standard folder could it?My ion is about 3 years old but it is pretty decent handles everything I can throw on it, an openelec distro running off the hdd. It runs at 1.8 ghz.Saying that , although your system is slower than mine, my own tests must say something. On my 1.8ghz tablet and my 1.8gz openelec performance is sluggish. The only differnce other than cpu speedis the network. It's not even openelec vs windows because the 18ghz tablet runs windows. Any ideas ? Am happy to do whatever tests on my end to get this going.I may install the server on my main pc and see if access times speed up when accessing it via the 1.8ghz tablet (I can play with that as much as I like, just the main openelec box should be stable as noone can watch anything lol Link to comment Share on other sites More sharing options...
froggy 0 Posted July 10, 2014 Author Share Posted July 10, 2014 I've done a series of tests , with various settings and services turned off.I got the lag down to about 3 seconds on version 7.5 and samba and smb service turned off, I've concluded that the box isn't suitable for this plugin and will return back to mysql databases, shame Link to comment Share on other sites More sharing options...
xnappo 1592 Posted July 10, 2014 Share Posted July 10, 2014 I am hoping @ will chime in - he is more adept at reading the profile than I am. Just don't give up hope quite yet. xnappo Link to comment Share on other sites More sharing options...
Recommended Posts