• (cs) in reply to dpm
    dpm:
    taylonr:
    The turned off post count (instead of just fixing the bug) and forums sped up by several orders of magnitude.
    That is quite impressive. Let's say it now takes one second to load a page. Before they disabled the count, it was taking one thousand seconds (three orders of magnitude), which is sixteen minutes and forty seconds. I admire your patience to wait that long for a single page!

    The vast majority of that 1 sec call is likely constant with respect to the size of the database however.

    The database access time is the only aspect that varies with the number of rows so it is the defining aspect of the algorithm's order of magnitude.

    The original approach was probably implemented less than optimally as O(N) (or higher if joining tables) and the version with no count was probably O(1). That could mean multiple orders of magnitude, a 1 sec delay afterwards, and still far less than 6 min processing originally.

  • I Can Haz Cheeze (unregistered) in reply to AlanGriffiths
    AlanGriffiths:
    SawFred:
    FredSaw:
    snoofle:
    Select $WTF From Comments Where TRWTF = 'Stupid Developer';
    This should be a featured comment.
    This should be a featured comment.
    This is not a featured comment!

    Ceci n'est pas un pipe.

  • (cs) in reply to I Can Haz Cheeze
    I Can Haz Cheeze:
    Ceci n'est pas un pipe.
    une pipe. Just sayin'.
  • Alan (unregistered) in reply to ParkinT
    ParkinT:
    What could have possibly been the intention of the developer who wrote this?

    In this case it's an open source project, so we could just find the responsible developer's name in the Subversion history and ask him directly. This could be a start of a WTF interview series: "What Were You Thinking?"

  • (cs) in reply to I Can Haz Cheeze
    I Can Haz Cheeze:
    AlanGriffiths:
    SawFred:
    FredSaw:
    snoofle:
    Select $WTF From Comments Where TRWTF = 'Stupid Developer';
    This should be a featured comment.
    This should be a featured comment.
    This is not a featured comment!

    Ceci n'est pas un pipe.

    (In consideration of native German speakers, English to German auto-translation ommitted)

  • Justin Wielly (unregistered)

    I would have to agree. You bring up some very valid points.

    JT www.FireMe.to/udi

  • (cs) in reply to DHager
    DHager:
    If you're someone who wants to justify " orders of magnitude" as a binary scale, then you're just as depraved as those hard drive companies and their "GB=1000KB".

    I don't care if the hard drive companies choose to use KB instead of KiB (KB is properly 1000 bytes, after all, following the metric system), but if you ever see a hard drive company advertise 1GB=1000KB, you've probably got them on some count of false advertising. And yes, if they made that statement, they would truly be depraved.

    In other words, even you can say something completely wrong, intending that it wouldn't be over-analyzed, DHager.

  • luke (unregistered) in reply to gabba

    Heh, is it PHPBB?

  • (cs) in reply to Markp
    Markp:
    DHager:
    If you're someone who wants to justify " orders of magnitude" as a binary scale, then you're just as depraved as those hard drive companies and their "GB=1000KB".

    I don't care if the hard drive companies choose to use KB instead of KiB (KB is properly 1000 bytes, after all, following the metric system), but if you ever see a hard drive company advertise 1GB=1000KB, you've probably got them on some count of false advertising. And yes, if they made that statement, they would truly be depraved.

    In other words, even you can say something completely wrong, intending that it wouldn't be over-analyzed, DHager.

    I used to consider SI/Metric as a rational system of measurement worthy of widespread use. Then I learned of their anachronistic attack on the digital world and realized that SI is pure evil and is the enemy of all civilization.

    1kb never has and never will equal 1000bytes in any sane world. A 32bit architecture addresses 4GB of memory and any ludite who claims it addresses 4.294967296GB should be banned from computers before they can do any irreperable damage.

  • Peter (unregistered) in reply to DHager

    Assuming you meant "1GB=1000MB", it's even worse than that. Every major hard drive maker I've seen advertises with 1GB=1000,000,000B. (That means you get 93% of what they told you, for those that care)

  • (cs) in reply to Spartan
    Spartan:
    I used to consider SI/Metric as a rational system of measurement worthy of widespread use. Then I learned of their anachronistic attack on the digital world and realized that SI is pure evil and is the enemy of all civilization.

    1kb never has and never will equal 1000bytes in any sane world. A 32bit architecture addresses 4GB of memory and any ludite who claims it addresses 4.294967296GB should be banned from computers before they can do any irreperable damage.

    Hey, don't go hating on metric just because when you say kibibyte, mebibyte, or (especially) gibibyte, you feel like you're entertaining a 2-month-old.

    A 32-bit architecture addresses 4 GiB of memory...as an engineer I don't think I can see a future which uses GB to represent binary magnitudes in a non-ambiguous manner. We'll have to suck it up. It's unfortunate, given that there was absolutely no reason for the term to lend itself to factors of 1000 instead of 1024, except that it made some evil corporations' storage media look larger than they actually were.

    Metric rocks because in the physical world, we deal in decimal. In computing, we deal in binary. Metric has absolutely no advantage in a binary world.

  • Beider (unregistered)

    Well I wouldn't say this is a giant wtf as these things are pretty common in web development.

    You have a query that does something fancy and smart that runs fine on your test server (with less than 100 rows in the DB). Then once deployed in a production environment it slows down like crazy.

    I remember a friend asking me to help him with his osCommerce site. The menu for osCommerce used to (and maybe still do) do a select for each category you have in your database. This select also did some joins as far as I remember and the result was that when you had a few categories and a lot of products the menu took ages to load, 30 sec on his site.

    Removed that code and it loaded in 0.3 sec. Now what did this magnificent code do? It displayed a count of the products in each category next to the category name.

  • TopicSlayer (unregistered)

    At first, I thought it would have been adding different column names for each item in the cache, therefore maintaining a table with lots of columns, but a single row. While this is still rediculous, it was the only reason I could think they would be altering the table "on the fly".

    Alas, either way that dev was smoking some rock.

  • FedUpWithPedants (unregistered) in reply to Bobbo
    Bobbo:
    Anrs:
    And maybe "several" can be just two.

    Oxford English dicco says maybe it can't.

    Just saying, like.

    Allow me to introduce you to the wonderful world of exaggeration.

  • Symbiatch (unregistered)

    Am I blind or didn't anyone notice the idiotic PHPism in the code block? The compare a variable to false with == which is true at least in two cases: when the variable is false and when it's 0.

    How I love those idiots that designed some PHP functions to return either an integer or boolean depending on the result. Naturally they couldn't return -1 from strpos when no match is found. Instead, just return false and let the programmers understand that they have to compare with === to false and not with ==

  • Symbiatch (unregistered) in reply to Symbiatch

    Actually, I tested it further. Also the string '0' equals to false, naturally. So that's three cases of matching, though in this case the returning "handle" naturally is never ever ever 0 or '0', never ever...

Leave a comment on “Yes, the Table is Still There”

Log In or post as a guest

Replying to comment #:

« Return to Article