quisp icon indicating copy to clipboard operation
quisp copied to clipboard

HoM Notification Timer optimization

Open Naphann opened this issue 3 years ago • 0 comments

HoMNotificationTimer is a self message for HoM Controller module, to reduce creating new messages and lessen the chance of having undeleted messages (memory leak), self messages should be not be created every time but it should only be created once during the initialization of the module and reuse.

Motivation for the change: initialized once and reusing self-messages

Reusing self messages have multiple advantages:

  • created only once. (no deallocating and allocating heap)
  • can be scheduled only one at a time (no duplication timer)
  • less place for memory leak

Other possible optimation point

  • interval should be set by proportion to fiber length (not fixed interval for all HoM)

Naphann avatar Sep 07 '21 06:09 Naphann