You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm creating a large RTree with about 10M points. I wanted to use a flyweight pattern for the geometry, but alas I can't because 1) Util.mbr() creates a new Rectangle instance instead of using my geometry directly, and 2) Rectangle is a class not an interface with an implementation.
Why does this matter? The Rectangle instances take 600MB of my heap whereas the underlying (point) data takes less than 200MB. If Rectangle was an interface with a default implementation, and if Util could use it directly when the items collection only has 1 item in it, that could have a big performance gain in terms of memory. Done right, it wouldn't hurt speed in any significant way.
The text was updated successfully, but these errors were encountered:
I'm creating a large RTree with about 10M points. I wanted to use a flyweight pattern for the geometry, but alas I can't because 1) Util.mbr() creates a new Rectangle instance instead of using my geometry directly, and 2) Rectangle is a class not an interface with an implementation.
Why does this matter? The Rectangle instances take 600MB of my heap whereas the underlying (point) data takes less than 200MB. If Rectangle was an interface with a default implementation, and if Util could use it directly when the items collection only has 1 item in it, that could have a big performance gain in terms of memory. Done right, it wouldn't hurt speed in any significant way.
The text was updated successfully, but these errors were encountered: