home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
Moving Pictures
Building dynamic lists when entering them directly rather than on plugin start?
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Bernard" data-source="post: 973430" data-attributes="member: 120430"><p>It is hard to think that a list of 1300 entries should really take longer than a second to execute (even without indexing). I'm used to running queries on 100k entries, within a second and no indexing. But that is with MsSql Server. I wish MePo can enable the use of MsSql because then db corruptions and multi-client access problems will be something of the past.</p><p> </p><p>Anycase, I have the same problem with 1003 entries. But my dynamic list is actually my Removable media labels. I have backup a lot of movies to DVDs and now like to have a list of my labels to work from. It also is bothersome if you are in the list, and you use "back" to the category list, it then seems like MePo is "hanging" while it is building that lists again. Also an upgrade to the code to rebuild that list only when you access them is a lot more reasonable, since I mostly use the "Unwatched" list. And only once in a while use the custom dynamic lists.</p><p> </p><p>I like RoChess's suggestion, maybe we can add custom indexes and it will stay since MePo upgrades does not revert changes to the DBs. I'm going to to try it sometime, and will post if I could get it to work.[DOUBLEPOST=1362943621][/DOUBLEPOST]Ok, I have cracked it! It was quite easy.</p><p> </p><p>I have 2 custom "filtered" categories and 1 "dynamic" categories.</p><p> </p><p>One is a list of all movies on my file server (filter with: fullpath START WITH "\\fileserver")</p><p>One is a list of all movies on my DVD backups (filtered with: fullpath DOES NOT START WITH "\\fileserver")</p><p>One is a list of all Media Labels (it has a subgrouping of each media label thus dynamic category)</p><p> </p><p>When I open "Moving Pictures" plugin, it took 32 seconds to display the list of categories (top level!!!). Then when you open any of the 3 categories it took 12 seconds).</p><p> </p><p>So I went and opened the MovingPictures db with SQL Lite Browser (found on SourceForge website). Then added a "index", for the "local_media (media_label)" table and column.</p><p> </p><p>Then I also went and changed my 2 filters to rather use [Media Label STARTS WITH "Movies"] and [Media Label DOES NOT START WITH "Movies"] Since all my DVDs labels start is named "Movies 1" to "Movies 82".</p><p> </p><p>Now when I open the Moving Pictures plugin, it opens in 9 seconds, and the category opens in less than 1 second.</p><p> </p><p>It was interesting to note that NO additional indexes exist on any field other than primary keys (default) and foreign keys. So if anyone has dynamic or filtered custom categories, even the default ones, they can benefit from adding indexes manually.</p><p> </p><p>Also for each movie all the actors is saved in 1 cell, seperated by a pipe symbol (|). So even if this field was indexed the system will still have to split each cells value to get a list of unique actors. So I'm not sure that an index will speed this process up.[DOUBLEPOST=1362944377][/DOUBLEPOST]Last post, on a sidenote, I just added indexes on: date_added, genres, certificates, year. But this did not increase the loading speed of the plugin to less than 8 seconds. So it seems to have no effect, doing this.</p></blockquote><p></p>
[QUOTE="Bernard, post: 973430, member: 120430"] It is hard to think that a list of 1300 entries should really take longer than a second to execute (even without indexing). I'm used to running queries on 100k entries, within a second and no indexing. But that is with MsSql Server. I wish MePo can enable the use of MsSql because then db corruptions and multi-client access problems will be something of the past. Anycase, I have the same problem with 1003 entries. But my dynamic list is actually my Removable media labels. I have backup a lot of movies to DVDs and now like to have a list of my labels to work from. It also is bothersome if you are in the list, and you use "back" to the category list, it then seems like MePo is "hanging" while it is building that lists again. Also an upgrade to the code to rebuild that list only when you access them is a lot more reasonable, since I mostly use the "Unwatched" list. And only once in a while use the custom dynamic lists. I like RoChess's suggestion, maybe we can add custom indexes and it will stay since MePo upgrades does not revert changes to the DBs. I'm going to to try it sometime, and will post if I could get it to work.[DOUBLEPOST=1362943621][/DOUBLEPOST]Ok, I have cracked it! It was quite easy. I have 2 custom "filtered" categories and 1 "dynamic" categories. One is a list of all movies on my file server (filter with: fullpath START WITH "\\fileserver") One is a list of all movies on my DVD backups (filtered with: fullpath DOES NOT START WITH "\\fileserver") One is a list of all Media Labels (it has a subgrouping of each media label thus dynamic category) When I open "Moving Pictures" plugin, it took 32 seconds to display the list of categories (top level!!!). Then when you open any of the 3 categories it took 12 seconds). So I went and opened the MovingPictures db with SQL Lite Browser (found on SourceForge website). Then added a "index", for the "local_media (media_label)" table and column. Then I also went and changed my 2 filters to rather use [Media Label STARTS WITH "Movies"] and [Media Label DOES NOT START WITH "Movies"] Since all my DVDs labels start is named "Movies 1" to "Movies 82". Now when I open the Moving Pictures plugin, it opens in 9 seconds, and the category opens in less than 1 second. It was interesting to note that NO additional indexes exist on any field other than primary keys (default) and foreign keys. So if anyone has dynamic or filtered custom categories, even the default ones, they can benefit from adding indexes manually. Also for each movie all the actors is saved in 1 cell, seperated by a pipe symbol (|). So even if this field was indexed the system will still have to split each cells value to get a list of unique actors. So I'm not sure that an index will speed this process up.[DOUBLEPOST=1362944377][/DOUBLEPOST]Last post, on a sidenote, I just added indexes on: date_added, genres, certificates, year. But this did not increase the loading speed of the plugin to less than 8 seconds. So it seems to have no effect, doing this. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
Moving Pictures
Building dynamic lists when entering them directly rather than on plugin start?
Contact us
RSS
Top
Bottom