Refactor CalendarAstronomer and the usage to be more efficient
General
Other Data
General
Other Data
Description
This issue is mentioned by Rich when he review
as a side issue. The current usage of CalendarAstronomer is
lock
setTime
getXXX
unlock
and internally, the setTime always clearCacheso there are really no caching of calculated value between the calls, only within the call
And I found many code inside CalendarAstronomer are incomplete and/or dead code and took up unnecessary member data space (for features incompleted and not used by any code). We should remove them and reduce the memory footprint that wasted and we then could just create the CalendarAstronomer on the stack instead of creat a global one and worry about multi thread.
This issue is mentioned by Rich when he review
as a side issue. The current usage of CalendarAstronomer is
lock
setTime
getXXX
unlock
and internally, the setTime always clearCacheso there are really no caching of calculated value between the calls, only within the call
And I found many code inside CalendarAstronomer are incomplete and/or dead code and took up unnecessary member data space (for features incompleted and not used by any code). We should remove them and reduce the memory footprint that wasted and we then could just create the CalendarAstronomer on the stack instead of creat a global one and worry about multi thread.