Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Thus the remaining processing (.6 * .975 * .97 = ~57%) takes place in getDecoratedTopic
For these tests, a typical processing time for the request was 13 seconds. So roughly 7400 milliseconds (ms) were in this method.

Within this method (getDecoratedTopic) almost all the muscle is used in forumManager (service) calls:

  • 26% is in getTopicByIdWithMessages (about 2000 ms)
  • 26% is in hasPreviousTopic (2000 ms)
  • 17.3% is in another invocation of hasPreviousTopic (1280 ms
  • 15% is in hasNextTopic (1110 ms)
  • 13.6% is in another invocation of *hasNextTopic * (1006 ms)

Both hasNextTopic and hasPreviousTopic are full scans of the forum's topics in their stored order. The scan compares the incoming/supplied topic with each iteration value. Upon a match, hasPrevTopic returns true of the previous iteration value (topic) is not null and hasNextTopic returns true of the next iteration value after the match is not null.

...

  1. save the results of previous invocations at the least. This should alone reduce CPU load spent in the parent method by 50% and response times by about %30 (4 seconds)