Like me, you might really like Firefox. Generally speaking, it does a really good job. However, after turning on your computer (I’m talking Windows only), the first time you run Firefox it seems to take a long time to load up. Subsequent loads are okay, but that first one is the slow one. I recently came across a pretty nifty utility called Process Lasso by Bitsum Technologies. I can’t remember why I downloaded it . . . probably because someone recommended it as a way to speed up Windows Vista a bit. I’ve noticed a significant improvement in load times for Firefox since I installed it a couple of days ago. That was a nice side effect. So, if your Firefox loads slow, try this utility (free for home use). It may speed up more than just Firefox. It works on pretty much all flavors of Windows, including XP x64 and Vista x64. Enjoy!
Archive for May, 2009
Does your Firefox load slow? Try this.
Posted by Joe on May 26, 2009
Posted in Tools & Utilities | 1 Comment »
Slick way of handling browser-specific CSS issues
Posted by Joe on May 14, 2009
Every web developer eventually comes across a major headache in cross-browser functionality. My most recent one was with the alignment of text that follows a radio button. Vertically aligning that text with text that comes before a radio button is a bit of a pain. The easiest way to handle this is to use a table and set the valign attribute to middle, like so:
<table>
<tr>
<td valign="middle">Select:</td>
<td valign="middle">
<input type="radio" name="fruit" />Apple
<input type="radio" name="fruit" />Orange
</tr>
</tr>
</table>
In this example, depending on your browser, you might see the text “Apple” and “Orange” sit lower than the “Select:” text. In Safari and Opera, this renders just fine. In IE, the text is 2 pixels lower and in Firefox, the text is 1 pixel lower. If we design for IE, then Firefox will be 1 pixel above, and Safari and Opera will be off. This is a case where browser-specific CSS is necessary, but you wouldn’t necessarily want to create a whole new stylesheet for it. Enter CSS Browser Selector by Rafael Lima. This nifty little piece of javascript lets you use browser-specific classes in your existing stylesheet. In this case, the solution was simple. First, we change the HTML a bit to put the text following the radio buttons in a label with a class named radio.
<input type="radio" name="fruit" /><label class="radio">Apple</label> <input type="radio" name="fruit" /><label class="radio">Orange</label>
Then, we reference the small javascript file in our HTML header:
<script type="text/javascript" src="css_browser_selector.js"></script>
Finally, we add the browser-specific CSS to our stylesheet:
.ie label.radio {
position: relative;
font-weight: normal;
top: -2px;
}
.gecko label.radio {
position: relative;
font-weight: normal;
top: -1px;
}
label.radio {
font-weight: normal;
}
Yep, it’s that easy. Now, IE and Firefox (gecko) render properly. Safari, Opera and other browsers just fall through to the last label.radio.
Posted in CSS | Tagged: CSS | Leave a Comment »
E Text Editor
Posted by Joe on May 7, 2009
If you haven’t checked out the E text editor for Windows, you might want to. This is one powerful editor. I’ve been using the trial version for a little while and have just scratched the surface of some of the cool features. Just this morning, I watched the screencast on the home page and found out there was a very cool feature that will no doubt save me some time. I can use the CTRL key to select multiple words, and change them all at the same time. Imagine changing a variable name in just a small section of code. Just highlight each one using the CTRL key and start typing. I love it! It also supports snippets, which are nothing new, but are very cool anyway. E taglines itself as “The power of TextMate on Windows.” I’ve never used TextMate, so this is a new introduction for me, and I like it. It’s hard to impress me with a text editor because I am a huge vi fan. I used it for a long time on Unix, and in my current job, I use it all the time on various Linux servers. I carried that use over to Windows with gvim. It’s powerful, to be sure. So, for me to even discuss another text editor is a big deal. The trial version of E is time limited to 30 days and the purchase price is $34.95. When my trial is up, I’ll be purchasing this one for sure.
Posted in Tools & Utilities | Leave a Comment »
Multitenant SQL Server Architecture
Posted by Joe on May 6, 2009
We have a very large database where I work that is architected as a multitenant database. This is great since all we have to do is add a new customer record, and the rest takes care of itself. Because of the proprietary nature of our platform, I can’t put the table schemas up here for you to look at. However, I am looking for advice or techniques you may have used to solve a particular problem.
When customers import their data, imports go fairly slow. We give customers standard fields to import data into, but then they also have the option of importing custom fields. The table that holds custom fields allows one record per customer/user/field. Each record is tied to the user, and the user data is stored in another table. If a customer has 10 custom fields defined and they upload 50,000 users with all 10 field values, this is a total of 500,000 custom data records. The import process has to first see if the custom data exists. If so, it updates that record. If not, it inserts a new record. As you can imagine with this process, the more custom fields a customer has, the slower the import process becomes. Each custom field has to be tied to the user before it gets updated or inserted. The user may or may not exist, so we have to first insert or update the user, get the user id, and use that for each custom data record. That means no bulk loading because we first need the user id. Think of it as a master-detail relationship. The table that holds users is the master. The table that holds custom data is the detail.
I’m curious to know what you’ve done, or would try to do with a scenario like this to make it super fast.
Posted in SQL Server | Leave a Comment »
