Jump to content

making this faster??


Rhys

Recommended Posts

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 by hixxy
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...