Details
-
Task
-
Status: Done
-
Minor
-
Resolution: Done
-
None
Description
This ticket has three parts -
- Research what needs to be done to improve the performance of the Vertex & Edge building SQL functions. See summary below.
- Propose the changes and why they are necessary or not necessary.
- Implement the changes - no regression tests should fail - providing a patch for the work. NOTE: It might be helpful to create a helper function to wrap this new code, as this could be used elsewhere.
Background: During my work on the VLE component I came across a few things that "might" help with improving performance for object building functions (Vertex & Edge specifically) -
- The key/value pairs of an object are sorted when the object is finalized to improve searching. It may save some time if the object were created with the key/value pairs already in that order. Meaning, it should short circuit the algorithm. Please investigate this.
- A function called add_agtype is used in building some objects. However, in some instances there is a lot of unnecessary work that can be avoided by doing it differently. This particular function [*add_agtype*] takes a datum and turns it into an agtype_value prior to adding it to the object. For primitive types, like integers (graphid), we can directly convert it and add it ourselves.
For examples of these, used with arrays and objects, see the functions build_agtype_value_array_of_agtype_value_edges and agtype_value_build_edge in agtype.c in the current VLE patch.
Attachments
Issue Links
- blocks
-
AGE2-334 [Apache AGE] Research & Refactor other functions that could benefit from AGE2-333
- To Do