Add Geometry::estimateMemorySize() API
See original GitHub issueI’m using ESRI Geometry API to provide geospatial query support in Presto ( https://prestodb.io/ ) and I need to calculate how much memory individual Geometry objects occupy. I’m using ClassLayout.parseClass to compute the base size of an object and then add on sizes of arrays, lists, etc. I need to be able to write this code:
private static final int MULTI_POINT_IMPL_INSTANCE_SIZE = ClassLayout.parseClass(MultiPointImpl.class).instanceSize();
private static final int MULTI_PATH_IMPL_INSTANCE_SIZE = ClassLayout.parseClass(MultiPathImpl.class).instanceSize();
(see https://github.com/prestodb/presto/pull/9474/files#diff-ac9e6026ae8bd12a435b09b61a5cc0fa)
But I can’t because MultiPointImpl and MultiPathImpl classes are package private.
Would it be possible to make them public?
Issue Analytics
- State:
- Created 6 years ago
- Comments:15 (15 by maintainers)
Top Results From Across the Web
How much GB of memory my renderer/scene is holding?
It doesn't have the size of geometry. I want to know the size of objects in MB. Memory calculation before loading the model....
Read more >User memory limit exceeded in gee for calculate PCA
I want to calculate PCA for the image Landsat 5 but i get this error User memory limit exceeded, I know it's because...
Read more >Geometry (Esri Geometry API for Java 2.2.0-SNAPSHOT API)
Drops an attribute from the Geometry. abstract long, estimateMemorySize(). Returns an estimate of this object size in bytes. protected ...
Read more >In Java, what is the best way to determine the size of an object?
long heapMaxSize = Runtime.getRuntime().maxMemory(); // Get amount of free memory within the heap in bytes. This size will increase // after garbage collection ......
Read more >Coding Best Practices | Google Earth Engine
This doc describes coding practices that are intended to maximize the chance of success for complex or expensive Earth Engine computations.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@randallwhitman Randall, I see 2.1.0 release in Maven central: https://mvnrepository.com/artifact/com.esri.geometry/esri-geometry-api/2.1.0
Thank you so much!
@mbasmanova Thank you! @randallwhitman What are the next steps?