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

chore(tile-converter): i3s-converter - mitigate "tiles" module dependency #2517

Merged
merged 4 commits into from
Jun 27, 2023

Conversation

belom88
Copy link
Collaborator

@belom88 belom88 commented Jun 16, 2023

  • removed Tileset3D & Tile3D dependency
  • it gives a memory usage improvement (about 10% for Frankfurt dataset)

@belom88 belom88 requested a review from ibgreen June 16, 2023 16:42
@belom88 belom88 changed the title chore(tile-converter): i3s-converter - mitigate "tiles" module dependency WIP: chore(tile-converter): i3s-converter - mitigate "tiles" module dependency Jun 16, 2023
Copy link
Collaborator

@ibgreen ibgreen left a comment

Choose a reason for hiding this comment

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

I am confused about the goals of this PR and I worry that we may have a misunderstanding.

The goal is not to hide the generic Tile3D from the tile-converter and replace it with a tiles3d specific class. In fact, this approach seems to significantly increase the amount of format specific knowledge that the converter has to deal with, and taking less advantage of the generic tiles module.

Regardless there some good typing here - I will approve but wish we had discussed more first.

@@ -163,3 +163,16 @@ export type TypedArrayConstructor =
| Uint32ArrayConstructor
| Float32ArrayConstructor
| Float64ArrayConstructor;

export type Tiles3DLoadOptions = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are these options defined in the tile-converter?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the i3s-converter specific options

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've found that we can use Tiles3DLoaderOptions here. Fixed in #2520

@@ -7,9 +7,10 @@ import convertB3dmToI3sGeometry, {
getPropertyTable
} from '../../../src/i3s-converter/helpers/geometry-converter';
import {PGMLoader} from '../../../src/pgm-loader';
import {calculateTransformProps} from '../../../../tiles/src/tileset/helpers/transform-utils';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are these importing across module boundaries? Preferably we should use scoped imports.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In tests we use other modules internals to make fake data.

Base automatically changed from vb/chore-3d-tiles-tile-content-type to master June 27, 2023 09:42
@belom88
Copy link
Collaborator Author

belom88 commented Jun 27, 2023

I am confused about the goals of this PR and I worry that we may have a misunderstanding.

The goal is not to hide the generic Tile3D from the tile-converter and replace it with a tiles3d specific class. In fact, this approach seems to significantly increase the amount of format specific knowledge that the converter has to deal with, and taking less advantage of the generic tiles module.

Regardless there some good typing here - I will approve but wish we had discussed more first.

We have different classes:

  • I3SConverter - converts 3DTiles -> I3S
  • Tiles3DConverter - converts I3S -> 3DTiles.

So it is OK that I3SConverter has format specific knowledge.

Initially we decided to get rid of Tiles3D and Tileset3D to decrease memory usage. The converter creates many instances of Tiles3D that is not really needed. For large datasets (100+GiB) it cause significant memory usage growth and even crash. We don't need frustum culling, lod selection and other functionality. Now the converter don't use any wrappers and uses directly output of Tiles3DLoader.

@belom88 belom88 changed the title WIP: chore(tile-converter): i3s-converter - mitigate "tiles" module dependency chore(tile-converter): i3s-converter - mitigate "tiles" module dependency Jun 27, 2023
@belom88
Copy link
Collaborator Author

belom88 commented Jun 27, 2023

TODO: add tests and TSDoc comments for new code in another PR

@belom88 belom88 merged commit 67105bd into master Jun 27, 2023
1 check passed
@belom88 belom88 deleted the vb/tile-converter-get-rid-of-tiles-dependency branch June 27, 2023 10:24
@dsavinov-actionengine dsavinov-actionengine added the ActionEngine The issue is on ActionEngine controll label Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ActionEngine The issue is on ActionEngine controll
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants