#9024 closed enhancement (fixed)
[patch] bbox/bounds memory optimizations
Reported by: | shinigami | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | |
Keywords: | Cc: |
Description
Hi,
bbox/bounds allowed access to coordinates through creation LatLon objects only, which led to creation of looots of useless instances. Example:
lat() > b.getMax().lat() | lon() < b.getMin().lon() | lon() > b.getMax().lon(); |
creates 4 objects just to find if point is outside of box.
So I made shortcuts getMinLat() for getMin().lat() etc...
Added few methods consuming (double lat, double lon) instead of (LatLon) to avoid m(new LatLon(lat,lon)) usages.
Changed some implementations. (counting center of rectangle really need not create two objects;)
Attachments (4)
Change History (11)
by , 11 years ago
by , 11 years ago
Attachment: | bboxplugins.diff added |
---|
comment:1 by , 11 years ago
comment:3 by , 11 years ago
Type: | defect → enhancement |
---|
comment:4 by , 11 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:5 by , 11 years ago
There's something very, very wrong in r6203 that broke rendering of many ways. I set back generated tested release of today to r6201 to fix this (I have no idea right now what happened).
comment:7 by , 11 years ago
Ee, ugly NaNs, sorry:(
I made few more changes there. First I tried to speed up QuadTiling.tile2LatLon(long quad), but it seems to we do not need it at all.
Look at it, if I understand it well the same can be easily computed from QBLevel parent's bbox and quadrant index.
I removed quad from QBLevel too, it is used nowhere now.
by , 11 years ago
Attachment: | quads.diff added |
---|
Thanks, there is room for improvements with these classes :)
Can you please first finish javadoc for all new public methods (methods without javadoc + empty javadoc statements such as "@return") ? Thanks.