#11657 closed enhancement (fixed)
[patch] User - createOsmUser memory optimization
Reported by: | shinigami | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 15.08 |
Component: | Core | Version: | latest |
Keywords: | performance | Cc: |
Description
little heuristic - when reading osm files, more changes in line have same user id usually.
Btw. what about using some primitive collections library? There are some Map<Long,..>, List<Double> etc.
We could remove it when JDK10 will come:).
Attachments (2)
Change History (11)
by , 9 years ago
Attachment: | userid.patch added |
---|
comment:1 by , 9 years ago
Type: | defect → enhancement |
---|---|
Version: | → latest |
comment:2 by , 9 years ago
Replying to shinigami:
little heuristic - when reading osm files, more changes in line have same user id usually.
Looks a little excessive... What do you gain by this optimization?
Btw. what about using some primitive collections library? There are some Map<Long,..>, List<Double> etc.
I would like that, but it should be supported by substantial performance improvement.
We could remove it when JDK10 will come:).
:)
comment:3 by , 9 years ago
Summary: | User - createOsmUser memory optimization → [patch] User - createOsmUser memory optimization |
---|
comment:4 by , 9 years ago
It cuts created Longs to ~1/4 in my measurements. Saved few hundred megs of garbage per minute of parsing.
comment:5 by , 9 years ago
What about just caching the last user (private static User lastUser
), then compare uid
with lastUser.getId()
?
comment:7 by , 9 years ago
Keywords: | performance added |
---|---|
Milestone: | → 15.07 |
patch