Feb
17
2012

Speeding things up a bit

Often when we launch a new campaign, and do a mass mailing, we get email complaints from people who say “it doesn’t work”.  What they sometimes mean is that there is a very long delay when they try to click through a campaign.  This is particularly true when a mass mailing goes out and several hundred people may be trying to simultaneously send off messages.  There can be a lot of reasons for that, but I’ve discovered one of them and have fixed this today.

Our campaigns are listed in a massive, flat ASCII text file – not a relational database.  This is a relic of the 20th century version of LabourStart.  We’re using a file that is over three million bytes in size when the optimum size for this sort of file is more like one million bytes.  By moving the closed campaigns to a different file, I’ve been able to reduce the size of that file by 90%.  Which should mean a much faster access to the data in it.

In addition, one tiny thing that might slow down the display of the page has been the call to Google Analytics.  As we no longer use this, I’ve removed a few lines of code at the bottom of the page — these lines were invisible to users, but may have caused a small lag.

In addition, and somewhat related to this, our web hosting company pointed out that the scripts we execute every 15 minutes which build all our newswires and stuff like that, may take longer than 15 minutes to run.  (There are probably over 200 scripts being run every 15 minutes.)  So I’ve changed this to run every half hour instead.  In theory, this should reduce some strain on the server, though we may want to look into a better solution down the road.

Written by admin in: Campaigns |

2 Comments »

  • Espen

    What do we use instead of Google Analytics?

    Comment | February 23, 2012
  • admin

    We use the internal statistics generated by our web hosting company, 1&1 Internet. They are not as pretty as Google, but they are far more accurate.

    Comment | February 23, 2012

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress | Aeros Theme | TheBuckmaker.com WordPress Themes