Rhys Posted January 7, 2006 Author Report Share Posted January 7, 2006 tgk yours works, but it still takes about a minute. tidy trax yours loads the time, but not the title and it's a little bit quicker. Link to comment Share on other sites More sharing options...
Angelia Posted January 7, 2006 Report Share Posted January 7, 2006 if it takes such a long time for him to load a simple text files then it wouldnt be a small amount; hash tables have a size limit. huge probably wasnt the best word to use Link to comment Share on other sites More sharing options...
Rhys Posted January 7, 2006 Author Report Share Posted January 7, 2006 well it's an mp3 player, so it will have quite alot of songs in if i got lots. i'm using about 1200 songs in their, which is 1200 lines in the text file which need to be loaded. Link to comment Share on other sites More sharing options...
hixxy Posted January 7, 2006 Report Share Posted January 7, 2006 (edited) if it takes such a long time for him to load a simple text files then it wouldnt be a small amount; hash tables have a size limit. huge probably wasnt the best word to use Yes they do. That limit is the amount of RAM you have left. You could write millions of entries to a single table without any problems except a huge speed drop as the table gets bigger. The size that you give to a hashtable when you create it using /hmake is not a size limit, but it is the size at which the table is created. Once you fill up the table it is expanded. This is why adding 10,000 items to a table with 100 as the size wouldn't be very efficient (because instead of just adding data, the table needs to be enlarged and the data is then added). tgk yours works, but it still takes about a minute. tidy trax yours loads the time, but not the title and it's a little bit quicker. Sorry about that I forgot to change %i to $1-: alias loadsongs { if ($isfile(mp3s.txt)) filter -fk mp3s.txt addtodialog } alias addtodialog did -a mp3 1 $replace($duration($calc($mp3($1-).length /1000)),mins,m,secs,s,min,m,sec,s) $chr(9) $gettok($nopath($1-),-1,46) Edited January 7, 2006 by hixxy Link to comment Share on other sites More sharing options...
Rhys Posted January 7, 2006 Author Report Share Posted January 7, 2006 nope in the title column it just says "mp3" i don't think it can be made any faster Link to comment Share on other sites More sharing options...
hixxy Posted January 7, 2006 Report Share Posted January 7, 2006 nope in the title column it just says "mp3" i don't think it can be made any faster Another stupid mistake (making a lot of them lately :\). $gettok should be $deltok: alias loadsongs { if ($isfile(mp3s.txt)) filter -fk mp3s.txt addtodialog } alias addtodialog did -a mp3 1 $replace($duration($calc($mp3($1-).length /1000)),mins,m,secs,s,min,m,sec,s) $chr(9) $deltok($nopath($1-),-1,46) Link to comment Share on other sites More sharing options...
Rhys Posted January 15, 2006 Author Report Share Posted January 15, 2006 still takes forever.. i don't think you can make it any faster. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now