Skip to content
Commit 6229d990 authored by Narayan Kamath's avatar Narayan Kamath
Browse files

LocalLog: Use LocalDateTime.now() instead of a Calendar.

Calendars are cloned once per format argument they're used for and cloning
a calendar is quite expensive. The line modified by this change used to
create dozens of objects, most of them pointlessly cloned.

Instead, we LocalDateTime, which is immutable and will be used directly.
Moreover, we can rely on its toString method which is specified to
format dates the same way we were doing in this class.

Test: manual
Change-Id: Ia2f6f5eb4f79252663c22b5a81d747c928771ee9
parent 89678d66
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment