Author Topic: Anyone noticed how fast things are lately :)  (Read 3409 times)

Patrick

  • Administrator
  • Hero Member
  • *****
  • Posts: 2550
  • Karma: +47/-2
    • View Profile
Anyone noticed how fast things are lately :)
« 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


« Last Edit: October 04, 2013, 09:56:43 am by Patrick »

Orca

  • Hero Member
  • *****
  • Posts: 2274
  • Karma: +54/-3
    • View Profile
Re: Anyone noticed how fast things are lately :)
« Reply #1 on: October 04, 2013, 10:20:42 am »
Oh. Now I understand.  O:-)
I started here with nothing and still have most of it left.

jaDEB

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4534
  • Karma: +30/-3
    • View Profile
Re: Anyone noticed how fast things are lately :)
« Reply #2 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.
jaDEB

If it scares you, it's a sign you need to do it

Orca

  • Hero Member
  • *****
  • Posts: 2274
  • Karma: +54/-3
    • View Profile
Re: Anyone noticed how fast things are lately :)
« Reply #3 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.
« Last Edit: October 04, 2013, 03:18:41 pm by Orca »
I started here with nothing and still have most of it left.