{"id":2136,"date":"2012-02-17T06:47:13","date_gmt":"2012-02-17T04:47:13","guid":{"rendered":"http:\/\/www.labourstart.org\/blogs\/?p=2136"},"modified":"2012-02-17T06:47:13","modified_gmt":"2012-02-17T04:47:13","slug":"speeding-things-up-a-bit","status":"publish","type":"post","link":"https:\/\/www.labourstart.org\/blogs\/?p=2136","title":{"rendered":"Speeding things up a bit"},"content":{"rendered":"<p>Often when we launch a new campaign, and do a mass mailing, we get email complaints from people who say &#8220;it doesn&#8217;t work&#8221;. \u00a0What they sometimes mean is that there is a very long delay when they try to click through a campaign. \u00a0This is particularly true when a mass mailing goes out and several hundred people may be trying to simultaneously send off messages. \u00a0There can be a lot of reasons for that, but I&#8217;ve discovered one of them and have fixed this today.<\/p>\n<p>Our campaigns are listed in a massive, flat ASCII text file &#8211; not a relational database. \u00a0This is a relic of the 20th century version of LabourStart. \u00a0We&#8217;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. \u00a0By moving the closed campaigns to a different file, I&#8217;ve been able to reduce the size of that file by 90%. \u00a0Which should mean a much faster access to the data in it.<\/p>\n<p>In addition, one tiny thing that might slow down the display of the page has been the call to Google Analytics. \u00a0As we no longer use this, I&#8217;ve removed a few lines of code at the bottom of the page &#8212; these lines were invisible to users, but may have caused a small lag.<\/p>\n<p>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. \u00a0(There are probably over 200 scripts being run every 15 minutes.) \u00a0So I&#8217;ve changed this to run every half hour instead. \u00a0In theory, this should reduce some strain on the server, though we may want to look into a better solution down the road.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Often when we launch a new campaign, and do a mass mailing, we get email complaints from people who say &#8220;it doesn&#8217;t work&#8221;. \u00a0What they sometimes mean is that there is a very long delay when they try to click through a campaign. \u00a0This is particularly true when a mass mailing goes out and several [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/www.labourstart.org\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/2136"}],"collection":[{"href":"https:\/\/www.labourstart.org\/blogs\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.labourstart.org\/blogs\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.labourstart.org\/blogs\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.labourstart.org\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2136"}],"version-history":[{"count":1,"href":"https:\/\/www.labourstart.org\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/2136\/revisions"}],"predecessor-version":[{"id":2137,"href":"https:\/\/www.labourstart.org\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/2136\/revisions\/2137"}],"wp:attachment":[{"href":"https:\/\/www.labourstart.org\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.labourstart.org\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.labourstart.org\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}