Simply horrible performance-wise

Anonymous
2002-05-07
2002-08-20
  • Anonymous - 2002-05-07

    Is it just me, or am I the only one really using this thing.
    The script is coded in a really nasty style: super-cramped, very low on comments, absolutely everything contained in 1 file (except the config).
    Mine (v0.9.7) came with broken ?random function, "security levels" functions completely messed up, and not working properly for multi level dirs at all, not to mention the database pass stored in clear text!
    Trying to debug the whole thing, stumbled on such inefficiency, I haven't seen in a long time:

    Ok now the best part. The whole thing is written in such a way, it'll make your SQL server cry and scream for help. I don't know what you guys run, but I have a simple FreeBSD Intel server. Oh it works great when the server is localhost, but move it away, and the site is dead.
    I've put mysql_db_query_counter++; just below every mysql_db_query() function call to see how many times these functions get called at the end. So, to show a page N, there are X SQL queries:

    Main page: 5 SQL queries
    Folder (10 images/page, all have 2+ ratings and comments): 102 SQL queries
    Image (hi/low res, comments/no comments, votes/no votes): 80 SQL queries
    Random Image: 98 SQL queries.

    This is just basic, you know, browse around the site. Those queries add up VERY quickly.

    Anyway, I've had my rant. This isn't really a BUG, but a whole redesign is in order. Mostly with that "Security levels" thing. There are at least 60+ queries wasted trying to figure out whether the current folder/image is OK to show.

    I'll be re-writing my copy of the script from scratch but don't worry, I'll give credit. I think in general, the whole thing is very well CONCIEVED. There are pieces that are reusable, but maybe 5%.
    I just think that the execution of the idea lacks big time.

     
    • Eddie Codel

      Eddie Codel - 2002-08-20

      so sep42, how's your rewrite going? i'm interested as i'm sure are many others.

       

Log in to post a comment.