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

Improve allocation behavior in JSAPI BarrageUtils.java #1626

Open
jcferretti opened this issue Dec 2, 2021 · 0 comments
Open

Improve allocation behavior in JSAPI BarrageUtils.java #1626

jcferretti opened this issue Dec 2, 2021 · 0 comments
Assignees
Labels
Milestone

Comments

@jcferretti
Copy link
Member

There are a couple of things we can do in BarrageUtils.java to reduce the allocation behavior when unmarshalling Object types. Today we need an intermediate byte[] array taken from a ByteBuffer, that we pass to constructors of variable-sized objects, like String, BigInteger and BigDecimal.

By having access to the BigDecimal(byte[] arr, int offset, int len) ctor available since Java 9, we can have better resizing behavior for the work array we use today (code currently used in the String case, but not in the BigDecimal/BigInteger cases). For this we need gwt support, not yet there, so when a version of gwt with this ctor is available, we can upgrade our dependency and try this.

Also, colin described an strategy where we can pry our way directly to the ByteBuffer without having to use an intermediate byte[] object taking advantage of some JS specific methods. As described by Colin over slack message: "we can actually grab the underlying typedarray inside the ByteBuffer (see the TypedArrayHelper that was used to make the LE ByteBuffer to begin with) and cast that to byte[]"

@jcferretti jcferretti added feature request New feature or request web-client-ui The Web GUI triage labels Dec 2, 2021
@jcferretti jcferretti added this to the Backlog milestone Dec 2, 2021
@niloc132 niloc132 changed the title Improve allocation behavior in BarrageUtils.java Improve allocation behavior in JSAPI BarrageUtils.java Dec 2, 2021
@niloc132 niloc132 added jsapi and removed web-client-ui The Web GUI labels Dec 2, 2021
mofojed pushed a commit that referenced this issue Nov 10, 2023
Release notes https://github.com/deephaven/web-client-ui/releases/tag/v0.54.0

# [0.54.0](deephaven/web-client-ui@v0.53.0...v0.54.0) (2023-11-10)


### Bug Fixes

* Date argument non-optional for the onChange prop ([#1622](deephaven/web-client-ui#1622)) ([9a960b3](deephaven/web-client-ui@9a960b3)), closes [#1601](deephaven/web-client-ui#1601)
* Fixing grid colors and grays ([#1621](deephaven/web-client-ui#1621)) ([9ab2b1e](deephaven/web-client-ui@9ab2b1e)), closes [#1572](deephaven/web-client-ui#1572)
* Infinite loop with grid rendering ([#1631](deephaven/web-client-ui#1631)) ([4875d2e](deephaven/web-client-ui@4875d2e)), closes [#1626](deephaven/web-client-ui#1626)
* Log figure errors, don't show infinite spinner ([#1614](deephaven/web-client-ui#1614)) ([75783d0](deephaven/web-client-ui@75783d0))
* non-contiguous table row selection background colour ([#1623](deephaven/web-client-ui#1623)) ([61d1a53](deephaven/web-client-ui@61d1a53)), closes [#1619](deephaven/web-client-ui#1619)
* Panels not reinitializing if makeModel changes ([#1633](deephaven/web-client-ui#1633)) ([5ee98cd](deephaven/web-client-ui@5ee98cd))
* remove unecessary dom re-calc in grid render ([#1632](deephaven/web-client-ui#1632)) ([ce7cc3e](deephaven/web-client-ui@ce7cc3e))


### Features

* Add `LayoutManagerContext` and `useLayoutManager` ([#1625](deephaven/web-client-ui#1625)) ([0a6965a](deephaven/web-client-ui@0a6965a))
* Add ResizeObserver to Grid and Chart ([#1626](deephaven/web-client-ui#1626)) ([35311c8](deephaven/web-client-ui@35311c8))
* Added test:debug script ([#1628](deephaven/web-client-ui#1628)) ([80f29f5](deephaven/web-client-ui@80f29f5)), closes [#1627](deephaven/web-client-ui#1627)
* Read settings from props/server config when available ([#1558](deephaven/web-client-ui#1558)) ([52ba2cd](deephaven/web-client-ui@52ba2cd))
* Theming - Charts ([#1608](deephaven/web-client-ui#1608)) ([d5b3b48](deephaven/web-client-ui@d5b3b48)), closes [#1572](deephaven/web-client-ui#1572)


### BREAKING CHANGES

- ChartThemeProvider is now required to provide ChartTheme
- ChartModelFactory and ChartUtils now require chartTheme args

Co-authored-by: deephaven-internal <deephaven-internal@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants