Note on Drupal best practices: when using db_set_active() to use another database, make sure to reset back to the default db as soon as you get the results from the other database. You can never be sure just when Drupal is gong to try another query that may need the default db.
Tagged: Drupal Toggle Comment Threads | Keyboard Shortcuts
-
Elmer Masters
-
Elmer Masters
Looking at importing WordPress categories into Drupal taxonomies. The WordPress Import module gets the categories into a a Drupal taxonomy easily enpough. Need to figure out how to move the terms from the imported vocab to the CALI Topic.
-
Elmer Masters
Added Draggable Views module to the mix on beta.cali.org so I can sort stuff the way I want. Working well for Topics. Design decisions about how taxonomy URLs get rewritten are kicking me in the butt though when it comes to sorting nodes under each term.
-
Elmer Masters
More bans on the Drupal system today. An IP address that belongs to Verizon FIOS and the panscient.com spider. Both repeatedly opened thousands of connections to seemingly random pages on the site over the course of 90 minutes this afternoon. Bad Spiders.
-
Elmer Masters
Quick update to the website theme to add a slogan we’re trying on. Needed a bit of styling to fit in.
-
Elmer Masters
Correcting spelling errors in the CALI Courses module. Committing changes to git, pushing to GitHub, and cross committing to SVN. All because I can’t remember “i” before “e”…
-
Elmer Masters
-
Elmer Masters
By removing the LOWER() functions from the validation routines in the core users.module, the system now uses the indexes on name and mail to check for uniques. The result is searches that run in the 10-20 millisecond range instead of 5-7 seconds. No more bottle neck. When dozens of bad registrations attempts happen at once the system just plows right through. It can handle upwards of 750 queries per second right now
-
Elmer Masters
So, Drupal makes extensive use of the LOWER() function in MySQL. The problem is that LOWER() ignores any indexes on columns and iterates through each row looking for a match. This is a problem if your user table has >600K rows. The problem was under discussion several years ago (see: http://drupal.org/node/181625; and this: http://drupal.org/node/83738; and is ultimately ignored at http://drupal.org/node/279851) but no solution was put in place for Drupal 6.
That means I’ll need to hack core to get this in.