[#1102] Implementation of the MORK type AdapterDB 2#1121
Closed
marcocapozzoli wants to merge 4 commits into
Closed
[#1102] Implementation of the MORK type AdapterDB 2#1121marcocapozzoli wants to merge 4 commits into
marcocapozzoli wants to merge 4 commits into
Conversation
andre-senna
reviewed
May 27, 2026
|
|
||
| try { | ||
| MettaExpression metta_expr{expr}; | ||
| atoms = this->mapper->map(DbInput{metta_expr}); |
Contributor
There was a problem hiding this comment.
I suppose this call maps the entire Mork Server contents. So you are keeping an extra copy of the atoms vector unecessarily. The container should be passed by reference to map() and be populated there directly.
This comment is coupled with another one regarding line 52 below.
You are crating yet another container (batch_queue) and make yet another copy of everything again.
I'm wondering if you cold create only batch_queue and pass its reference to be populated in mapper->map().
| } | ||
| #endif | ||
|
|
||
| return this->atoms; |
Contributor
There was a problem hiding this comment.
Regarding my comments about src/db_adapter/non_sql/mork/MorkWrapper.cc
Here you keep yet another copy of all atoms.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implementation of MorkMappingStrategy and Metta2AtomsMapper