Hello to all,
I am a confused on looping and output buffering in regards to execution time.
I have 3000+ music files stored
they have a file structure
Library as main directory
then artists by directory
then albums by directory
then the songs for that album
Example
C:/Library/3 Doors Down/Away from the Sun/01 - Away from the sun.mp3
would be a typical file layout
I parse through the directories and read the files into an array
I then go through and read the ID3tags to update a data base with the info
file location|file name|artist|album|title|track etc.....
SO herein lies the problem, this takes about 35-45 seconds to parse all the information and my script will time out unless I increase the script execution time.
While I am sure my coding is not the most efficient, its how I do it.
I was using a DO WHILE LOOP during the update portion
but it seems that no ouput is performed until the entire loop is finished.
Is that correct?
or if I were to use a FOR LOOP will output info be perform for each execution? or does it also wait until the entire script is finished.
I am just confused on how this all works..
I hope I explained it correctly
Thanks for any input you may have
I am a confused on looping and output buffering in regards to execution time.
I have 3000+ music files stored
they have a file structure
Library as main directory
then artists by directory
then albums by directory
then the songs for that album
Example
C:/Library/3 Doors Down/Away from the Sun/01 - Away from the sun.mp3
would be a typical file layout
I parse through the directories and read the files into an array
I then go through and read the ID3tags to update a data base with the info
file location|file name|artist|album|title|track etc.....
SO herein lies the problem, this takes about 35-45 seconds to parse all the information and my script will time out unless I increase the script execution time.
While I am sure my coding is not the most efficient, its how I do it.
I was using a DO WHILE LOOP during the update portion
but it seems that no ouput is performed until the entire loop is finished.
Is that correct?
or if I were to use a FOR LOOP will output info be perform for each execution? or does it also wait until the entire script is finished.
I am just confused on how this all works..
I hope I explained it correctly
Thanks for any input you may have