Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor implementation of scale/offset, unsigned conversion, and convert missing #1163

Merged
merged 29 commits into from
Jul 6, 2023

Conversation

haileyajohnson
Copy link
Member

No description provided.

@WeatherGod
Copy link
Contributor

I'm currently investigating a performance issue in TDS serving up an NDVI dataset encoded with add_offset and scale_factor. I suspect some sort of memory leak or at best superfluous memory usage. I haven't looked through this PR yet, but do you suspect it might address those issues? Is it in a state where I could try it out myself and see if the problem is better or worse?

Array data = v.read();
assertThat((int[]) data.copyTo1DJavaArray()).isEqualTo(expected);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One test I'd be curious to see is if I take values that are from -1 to 1 and encode them as unsigned 8 bit integers (so, scale_factor = 0.008 and add_offset = -1), will the decode process give me back an array of floats rather than doubles. It isn't immediately clear to me that it would do that given that internally the scale and offset are stored as doubles.

@haileyajohnson
Copy link
Member Author

I'm currently investigating a performance issue in TDS serving up an NDVI dataset encoded with add_offset and scale_factor. I suspect some sort of memory leak or at best superfluous memory usage. I haven't looked through this PR yet, but do you suspect it might address those issues? Is it in a state where I could try it out myself and see if the problem is better or worse?

There's more changes to follow this PR that should fix some of the performance issues, I'd hold off on testing for a bit.

@haileyajohnson haileyajohnson marked this pull request as ready for review May 10, 2023 17:20
@haileyajohnson
Copy link
Member Author

This should be g2g now :)

@haileyajohnson haileyajohnson merged commit 34e722a into Unidata:maint-5.x Jul 6, 2023
10 checks passed
@haileyajohnson haileyajohnson deleted the scale-offset branch July 7, 2023 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants