17

Follow-up To Loading CSS And JS Conditionally


Posted by Artem Russakovskii on January 15th, 2010 in Programming, Wordpress

First of all, I'd like to thank everyone who read and gave their 2 cents about the [Wordpress Plugin Development] How To Include CSS and JavaScript Conditionally And Only When Needed By The Posts post. The article was well received and will hopefully spark some optimizations around loading styles and scripts.

Here are some discussions and mentions around the web:

Sure, there are drawbacks to this method and it does require some more processing on the backend and it's not for everyone, which is why we should always strive for an even better solution.

I stand by my point of view that, for instance, my dedicated …

Read the rest of this article »

Updated: August 30th, 2014

Introduction

wordpress logo In this tutorial, I am going to introduce a WordPress technique that I believe was unpublished until I raised the question a few days ago on the WordPress forums.

In short, the problem I was trying to solve was plugins unnecessarily loading their JavaScript and CSS on *every* page of the blog, even when doing so would achieve absolutely nothing and the plugin wouldn't do any work.

Update #1: I have posted a follow-up in response to some comments received around the web.
Update #2: There is a solution that can be considered a compromise as it works well for loading JavaScript but doesn't handle CSS.

I briefly mentioned this approach here but Scribu decided to expand on …

Read the rest of this article »

image

Introduction

Dear Skype,

you are great. You have the convenience of a nearby, well, convenience store and the UI that is acceptable to even an Apple fanboy (I'm not one, I'm just saying).

Skype also has a Firefox extension which finds all pieces of text that resemble phone numbers on web pages you are visiting and converts them into clickable Skype buttons image. One click and you're dialing the number. The premise is great but the execution… When it comes to your Firefox extension, Skype – you suck. You really suck.

The Problem Bullshit

So what makes me say these mean things? Is it the fact that when simply searching Google for "skype firefox", one finds mostly blog posts …

Read the rest of this article »

21

Best MySQL Server Under $10K?


Posted by Artem Russakovskii on June 11th, 2008 in Databases

Updated: January 4th, 2009

Server picture I want to get opinions from outside of my daily circle of people on the best server hardware to use for MySQL. I remember from the conference somebody (Pipes?) mentioning a particular Dell server with multiple disk RAID10 that could supposedly be had for about $6k but I completely misplaced the model number (Frank, did you get my email?).

I know that a multi-disk RAID array with a bunch of fast disks (15k RPM?) is probably the most important method of improving performance, followed by the amount of RAM, so I'm trying to find the best combination/balance of the two. However, server prices on the Internet range so much that I don't even know where to begin to tell a …

Read the rest of this article »

  • Jay Pipes, Tobias Asplund
  • Finding out the number of rows that would have been returned (MyISAM and InnoDB)
  • SQL_CALC_FOUND_ROWS and FOUND_ROWS()
  • COUNT(*)
  • MEMORY table
  • if query cache is on, then it makes no difference
  • if it's off
  • Memory MyISAM is fastest
  • FOUND_ROWS() is slightly slower than count(*)
  • more in the slides that I'll add later
  • quite a lot of humor, these guys are fun
  • query union vs index_merge union
    • SELECT … WHERE a UNION SELECT … WHERE b
      vs
      SELECT … WHERE a AND b
    • index_merge wins
  • composite index vs index merge
    • composite index is faster
    • of course, multiple indexes are more flexible than composite index
  • sort union vs composite index
  • unix time (int unsigned) vs datetime
    • Speaker: Mikael Ronstrom, PhD, the creator of the Cluster engine
    • Explains the cluster structure
    • Aspects of performance
      • Response times
      • Throughput
      • Low variation of response times
    • Improving performance
      • use low level API (NDB API), expensive, hard
      • use new features in MySQL Cluster Carrier Grade Edition 6.3 (currently 6.3.13), more on this later
      • proper partitioning of tables, minimize communication
      • use of hardware
    • NDB API is a C++ record access API
      • supports sending parallel record operations within the same transaction or in different transactions
      • asynchronous and synchronous
      • NDB kernel is programmed entirely asynchronously
    • Looking at performance
      • Fire synchronous insert transactions – 10x TCP/IP time cost
      • Five inserts in one synchronous transaction – 2x TCP/IP time cost
      • Five asynchronous insert transactions – 2x TCP/IP
    • Read the rest of this article »