question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add Geometry::estimateMemorySize() API

See original GitHub issue

I’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:closed
  • Created 6 years ago
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
mbasmanovacommented, Mar 20, 2018

@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!

1reaction
alockecommented, Mar 19, 2018

@mbasmanova Thank you! @randallwhitman What are the next steps?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found