December 23rd, 2007
I’ve been working on a major update for my most popular website for the last couple of months. It’s a complete redesign of both layout and most of the code (you do pick up a thing or two during the years so my old code needs to get a bit of a polish).
I’ve found out that the front page on the new updated site has been a fair bit slower than usual the last couple of weeks. Since the redesign is not yet public I haven’t really bothered to look at why that was the case. Today when I was going to start with some new features it was quite unbearably slow so I had to take a look at it right away.
At first I started to look at every mySQL query and started to optimize the tables with some new indexes. It did save me a couple of milliseconds on each query but the slow page load was up to several seconds, not just milliseconds, so this was probably not where the problem was.
I then added a timing script at the top of the file and printed out the execution time above and below every sub section of the front page to find out where the server was choking. It soon became clear that there were two parts of the script that was messing things up. Both of them involved jpeg images. And both of them involved using PHP’s getimagesize function to get the width and height of images.
Earlier I had switched servers a couple of times and to make things easier when switching servers I decided to use the URL to check for the images instead of the server’s internal link structure as the URL would always be the same.
By changing the following line:
$size = getimagesize(”http://www.domain.com/images/$filename”);
to:
$size = getimagesize(”/home/domain/wwwroot/domain.com/images/$filename”);
the execution time for my front page went down from over 15 seconds to 0.36.
Posted in PHP | No Comments »
December 21st, 2007
About a year ago I decided to develop my own web directory script. The result became the Aliendir, which unlike all the humanly edited web directories you come across off course is alien edited. I started it out as a free directory with options for featured and deep link listings. During the summer though I decided to stop accepting paid links as I’ve just had too many submissions. At present time I have over 10,000 listings awaiting inclusion. At present rate, however, I mostly reject sites because:
- People don’t read the very few submission rules I have
- The majority of sites are crap!
- People submit to paid options but “forget” to pay
So far I have rejected 7,194 sites and only included 1,297.
Anyway, I treated myself to the deep link options which gives the webmaster the opportunity to link (using regular <a href> tags) to up to three sub pages as well as the homepage in the listing. The deep link option also works as a featured listing so it will appear above other results.
The listing added (which would have set me back $5 if I didn’t own the site ;) ) is available here:
http://www.aliendir.com/Computers/Webmaster_related/Blogs__/
Posted in Link building | No Comments »
December 20th, 2007
The first links pointing to the Just One Link blog have now been added. I’m not going to spend any mone getting links to this blog during the startup phase. Later on I might start using a small percentage of the potential revenue to get good links but for now it’s free stuff all the way.
As it happens I run two different web directories. They were just small programming projects of mine and haven’t really been marketed but they do have a fair number of pages indexed by Google and the other search engines so a link from them can’t hurt.
The one I started submitting to is tag based and is located over at TAG3. I chose to use two different tags; “blog” and “SEO” and then I chose two different anchor texts to go with them. “Web marketing blog” for the SEO tag and “SEO blog” for the Blog-tag. As it’s my site I treated myself to a free featured listing which positioned the listings at the top of each tag page.
My listings ended up here:
http://www.tagtagtag.net/tags/seo/
http://www.tagtagtag.net/tags/blog/
Posted in Link building | No Comments »
December 20th, 2007
This is the very first post of the Just One Link blog. This blog is about a struggling webmaster and his aims for greatness. The blog will focus on everything webmaster related, from developing to marketing.
If this blog, and the webmaster behind it, succeeds in making it then you can apply the tips and techniques in the blog to your pages. And if it doesn’t work out you do the complete opposite of what I did.
Let the adventure begin.
Posted in Blog | No Comments »