Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
txp:file_download_list
I have a file list of about 480 files which is increasing all the time. I was previously using individual ID’s and placing them manually into an alphabetical list.
For example:
A
txp:file_download form=“files” id=“418”
txp:file_download form=“files” id=“364”
txp:file_download form=“files” id=“180”
txp:file_download form=“files” id=“246”
txp:file_download form=“files” id=“243”
txp:file_download form=“files” id=“423”
txp:file_download form=“files” id=“118”
This is proving to be too time consuming so I have been looking into the options.
I may be wrong but it looks as if the following should work?
txp:file_download_list limit=“500”
The thing is – it actually does work but very inconsistently and very very slowly.
Is there something I need to add to make it run faster?
Thanks for any help anyone can offer.
Offline
#2 2006-03-14 02:48:34
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: txp:file_download_list
What’s the runtime figure on that page when you use file_download_list?
What do you mean by “inconsistently”?
Alex
Offline
Re: txp:file_download_list
Hello Alex,
The page having the problems has these results
Runtime: 8.9790 —>
Query time: 0.247831 —>
Queries: 1938 —>
Memory: no info available —>
Whereas most of the other pages return
end default page template —>
Runtime: 0.1694 —>
Query time: 0.043022 —>
Queries: 38 —>
Memory: no info available —>
And by inconsistently I mean that sometimes it does not load at all and only a blank page will appear.
Last edited by Catalyst (2006-03-14 05:15:35)
Offline
#4 2006-03-14 05:43:04
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: txp:file_download_list
Thanks. Looks like there’s a hopelessly inefficient query in the file_download_list code that’s causing the problem.
Alex
Offline
#5 2006-03-14 05:49:55
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: txp:file_download_list
For the moment, don’t use this tag for large lists. It needs to be fixed.
Edit: ah, Alex got here ahead of me. :D
Last edited by Mary (2006-03-14 05:50:21)
Offline
Re: txp:file_download_list
Thanks for looking into it.
I just noticed that when I put back in my original method as explained in my original post, it is continuing to load very slowly now, which is unusual because it was not doing this previously. So, perhaps there is some other factor causing the problem.
I am not sure what it would be though.
Off to work for now, but will keep trying to sort it out.
Thanks again :)
Last edited by Catalyst (2006-03-14 06:09:27)
Offline
Re: txp:file_download_list
It would appear that the cause of the problem, after a huge process of elimination mind you, was not the txp:file_download_list limit=”500” tag but was in fact, the stupid gravatars I added a few days ago.
So, it seems to be working properly now. I have screamed so it’s ok. I feel better now.
However, my next step is to try and list them a bit more neatly. 480+ files all bunched together looks a tad untidy and I would like to be able to split them into alphabetical groups A – D, E – H and so on, or even A, B, C…
Is there something I can add to the tag to allow for this process or am I going to have to go in and individually change the theme tag on every single download?
Or, can this be done via phpmyadmin or some other method which will be a bit quicker than doing them one by one through the files admin panel in TextPattern?
Thanks for any advice :)
Offline
#8 2006-03-14 18:37:35
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: txp:file_download_list
Don’t use this tag. Seriously. It may not have caused the slowdown, but it is still broken, not a good idea to use this tag for large lists, until it can be fixed.
Offline
Pages: 1