#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)
Changed 10 years ago by
Changed 10 years ago by
Attachment: | bboxplugins.diff added |
---|
comment:1 Changed 10 years ago by
comment:3 Changed 10 years ago by
Type: | defect → enhancement |
---|
comment:4 Changed 10 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:5 Changed 10 years ago by
comment:7 Changed 10 years ago by
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.
Changed 10 years ago by
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.