Using Java to read ID3 Tags and Insert Into a Database

I read from ray camden’s blog on how to use a java utility to get the id3 tags from mp3 files…

Ray Camdens Blog

This works fantastic, but i’m working on a amd 1800XP and windows 2k3… it’s a home server… cf 7 developers edition…

I host a music site, and used it to learn coldfusion… “”

I’m also learning cf flash forms with the beta site, but the beta site is having a lot of search engine difficulties because it’s flash, i havent put a lot of time into the search engine optimization because of the legalities of the site… but it’s still highly useful regardless, and it uses AJAX to reload the flash music player. “” The problem with this ID3 Java based reader is that is that I have over 14,000 music tracks, and i’m trying to synch this all to a database, i’m using SQL Express 2005, and i think i need to get another box to simply just host the database, i’m running stored procedures to insert into the database. The site works, but it takes about a half hour to run the script, with no successful output to the page, i’ve tried using cfflush to get some output to the page, but it fails almost right after the first couple of artists…

When I look at my processes running in the background, my processor is fully pegged even after I manually end iexplore.exe process from running… my processor stays absolutely 100 percent pegged, i’m not sure why, if I ended the page, shouldn’t that end the process?

When I comment out the Java part from reading the ID3 Tags, the page runs, and cfflush works great. That leads me to the java object, taking up the process, it’s either that, or sql, and the stored procedures I use…

So what I did to test, was commented out the calling of the stored procedure, and that would eliminate the java object if the page worked…

Immediately the jrun.exe started taking anywhere form 94 – 98% of the processor… I don’t have that good of a processor, but still, it pegged it!

The Memory usage of the machine is fine! i can’t believe this, the page stopped running after 3 artists 7 or 8 albums, and about 100 tracks ran… I’ll try to clear the structure that the java object creates… to test other things, maybe that will let it relax, other ideas…

instead of recursing all of my artists, maybe i should recurse everything in the directories, but then take turns going through the directories by letter?

In example.

<!————————————— <Artists> ———————————————————->

<cfdirectory directory=“#WorkingDir#” name=“ArtistDirQuery” action=“LIST”>

<!— Get an array of directory names. —>

<cfset ArtistDirArray=arraynew(1)>

<cfset i=1>

<cfloop query=“ArtistDirQuery”>

<cfif ArtistDirQuery.type IS “dir”>

<cfset ArtistDirArray[i]>

<cfset i = i + 1>



<!— Get the total amount of Artists —>

<!— vArtistCount can be declared anywhere outside of the loop, but after ArtistDirQuery —>

<cfset vArtistCount = ArtistDirQuery.recordCount>


<!—————————————- <BEGIN NO ARTIST IF STATEMENT> ———————————->

Page 1 of 2 | Next page