-
Notifications
You must be signed in to change notification settings - Fork 11
Cache only the encoding plan to avoid inconsistencies #193
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
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -359,7 +359,7 @@ struct CoreOperations { | |
| /// prepares the structure required for a future internal cache design. | ||
| /// | ||
| CacheEntry(Layout&& layout, const MarsDict_t& inputMars, const ParDict_t& inputMisc, const OptDict_t& options) : | ||
| encoder_{std::move(layout)}, preparedSample_{encoder_.prepare(inputMars, inputMisc, options)} {}; | ||
| encoder_{std::move(layout)} {}; | ||
|
|
||
| CacheEntry(const CacheEntry&) = delete; | ||
| CacheEntry& operator=(const CacheEntry&) = delete; | ||
|
|
@@ -383,7 +383,7 @@ struct CoreOperations { | |
| /// during `finaliseEncoding()`, which derives a fresh output handle | ||
| /// from it. | ||
| /// | ||
| const std::unique_ptr<const OutDict_t> preparedSample_; | ||
| // const std::unique_ptr<const OutDict_t> preparedSample_; | ||
| }; | ||
|
|
||
| /// | ||
|
|
@@ -551,7 +551,7 @@ struct CoreOperations { | |
| normalize_if_enabled(inputMars, inputMisc, options, language, scratchMars, scratchMisc); | ||
|
|
||
| auto gribHeader = | ||
| cacheEntry.encoder_.finaliseEncoding(*(cacheEntry.preparedSample_), activeMars, activeMisc, options); | ||
| cacheEntry.encoder_.encode( activeMars, activeMisc, options); | ||
|
|
||
| return encodeValues(values, activeMisc, options, std::move(gribHeader)); | ||
|
Comment on lines
553
to
556
|
||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CacheEntryno longer prepares/caches an immutable sample, but the constructor’s Doxygen comment still says it “prepares an immutable reusable sample from the active metadata” and the type-level docs describe a two-phase (prepare/finalise) pipeline. Please update the documentation (and potentially the constructor signature/call sites) to reflect that this cache entry now only caches the resolved layout/encoding plan.