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

SceneData field specification optimizations #542

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mosra
Copy link
Owner

@mosra mosra commented Dec 7, 2021

Originally meant to be a part of #525, but at the very last second I realized nasty interactions with the compatibility single-function-object conversion tools, which have to get fixed first. Things to do:

  • make SceneTools::combine() aware of implicit null mappings and trivial fields
    • not choking on them
    • probably also preserving them where possible instead of expanding
  • SceneTools::convertToSingleFunctionObjects() needs to be aware of these as well
    • in particular not removing SceneFieldFlag::ImplicitMapping for fields passed to combine(), as those will turn implicit null fields into placeholders
    • should it instead unconditionally expand them? probably for the best, especially given that neither the parent field nor the implicit mapping will stay implicit or trivial

Looks like I dug a really deep pit and then managed to fall at the very bottom. Yey. Or maybe there's some other solution / different way of implementing implicit or trivial fields without making them null? Some possibilities:

  • Make it possible to have each field in a separate allocation (and thus per-field DataFlags, etc.)?
    • thus the implicit / trivial fields could be a static memory / allocated in addition to a memory-mapped file
    • still won't solve the unnecessary overhead of having to allocate e.g. 400 kB of memory that contains just numbers 0-100k
    • and will make mapping shared between fields a lot more complicated, leading to each having to allocate its own (sigh!)
    • OTOH could make it easier to capture live data (and allow them to individually grow/shrink...)

@mosra mosra added this to the 2021.0a milestone Dec 7, 2021
@mosra mosra mentioned this pull request Dec 7, 2021
81 tasks
@mosra mosra force-pushed the scenedata-optimizations branch from 2ad3abd to da27aac Compare December 20, 2021 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

1 participant