The JSE and finance forum for South Africa

General Category => Off topic => Topic started by: Patrick on October 04, 2013, 09:53:18 am

Title: Anyone noticed how fast things are lately :)
Post by: Patrick on October 04, 2013, 09:53:18 am
One of my sites apps went live unexpectedly at midnight on the blackberry store a few days ago, and downloads went from 20 a day to 400 in one day. This seemed to push things slightly over the edge without me watching, so I had quite a shock when I woke up.

Normally server loads hover between 2 and 4 (I have 4 processors, so anything over 4 means something has to wait for a processor), but by the time I woke up I was on a load of 10 with spikes over 20???.

Anyway, I had to look into optimising my code. I re-wrote a section to cache a number of values, which helped a fair amount, but in doing so I also noticed that there was an empty field where I would have preferred a zero. Empty fields don't bother php, but on the java side on the phone, it kept requesting more data as it didn't understand the blank. That damn zero was creating havoc and I never even knew! Happily load now stays under 1 mostly, so I could even cut my processors in half if I felt like it, or triple the traffic to my sites without needing an upgrade  ;D

Here's what clean code can do
(http://i174.photobucket.com/albums/w112/pgpatrick/Capture1_zpsed420b4d.jpg) (http://s174.photobucket.com/user/pgpatrick/media/Capture1_zpsed420b4d.jpg.html)
(http://i174.photobucket.com/albums/w112/pgpatrick/Capture3_zpsb0783855.jpg) (http://s174.photobucket.com/user/pgpatrick/media/Capture3_zpsb0783855.jpg.html)
(http://i174.photobucket.com/albums/w112/pgpatrick/Capture2_zpsb888ab44.jpg) (http://s174.photobucket.com/user/pgpatrick/media/Capture2_zpsb888ab44.jpg.html)
Title: Re: Anyone noticed how fast things are lately :)
Post by: Orca on October 04, 2013, 10:20:42 am
Oh. Now I understand.  O:-)
Title: Re: Anyone noticed how fast things are lately :)
Post by: jaDEB on October 04, 2013, 12:48:11 pm
Thanks Patrick, makes sense. Any case I have a I3 - 3.2 Ghz processor, 550Ti 1G graphic card and 4 Ram, why does my Company of heroes 2 keep lagging when I play on line 1vs1.?

And I see also as per your graphs, that the Bulls will be winning tonight against the Sharks.
Title: Re: Anyone noticed how fast things are lately :)
Post by: Orca on October 04, 2013, 02:38:42 pm
No jaDEB.  :frustrated: That is a chart of Patricks share.
The top one is his Clean Code share and the bottom ones are the Ocsilators like Stochastics and Momentum indicators. Looks like a buy.