I have created a simple little game for my android phone. It reads through a list of 2000 words on a regular basis.
As I've added more features, I've noticed that it has slowed noticeably and is now taking too long for comfort - 3 or 4 seconds. To track where it was looping or misbehaving, I added a LOG statement at the start of each sub routine.
Here's the strange thing - just by adding those LOG statements, with no other changes, the game is now performing instantly. All time delay has vanished and I'm going to have to add more SLEEP statements to slow it down for usability.
Does anybody know why adding the LOG statements has made the program run vastly faster?
Thanks,
Alex
As I've added more features, I've noticed that it has slowed noticeably and is now taking too long for comfort - 3 or 4 seconds. To track where it was looping or misbehaving, I added a LOG statement at the start of each sub routine.
Here's the strange thing - just by adding those LOG statements, with no other changes, the game is now performing instantly. All time delay has vanished and I'm going to have to add more SLEEP statements to slow it down for usability.
Does anybody know why adding the LOG statements has made the program run vastly faster?
Thanks,
Alex