One-Way Reference System for Document Position Marks
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current content editing systems face memory management issues due to bidirectional linking between position marks and nodes, leading to increased memory footprint and potential memory overruns, as nodes retain references to position marks even after they are no longer needed.
Innovation Solution
Implementing a one-way reference system where position marks only reference nodes without nodes having references back to them, enabling position marks to update themselves when nodes change, and using change records to manage memory allocation efficiently.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If bidirectional linking is implemented between position marks and nodes, then position marks can be automatically updated when nodes change, but memory footprint increases and memory overruns may occur
Solution Approach 1:
The bidirectional reference structure is segmented into two separate unidirectional references: nodes reference change records, and position marks reference change records. This segmentation eliminates the circular reference between nodes and position marks, reducing memory overhead while maintaining the ability to update position marks through the change record intermediary.
Solution Approach 2:
Change records serve as an intermediary object between nodes and position marks. Instead of direct bidirectional linking, both nodes and position marks reference the change record, which mediates the relationship and enables position mark updates without requiring a direct reference back from nodes to position marks.
2Reliability
If nodes retain references to position marks, then position marks can be updated when nodes change, but nodes become computationally dependent on position marks
Solution Approach 1:
The reference direction is inverted: instead of nodes referencing position marks, both nodes and position marks reference the change record. This inversion breaks the computational dependency from nodes to position marks while maintaining the tracking functionality through the shared reference to change records.
Solution Approach 2:
Change records act as an intermediary that decouples the computational dependency between nodes and position marks. By referencing the change record instead of each other, nodes and position marks maintain their independence while still being able to track changes through the shared intermediary object.
3Measurement precision
If change records are retained in memory, then position marks can be updated accurately, but memory allocation increases
Solution Approach 1:
Change records are discarded from memory once they have been processed and incorporated into the node structure. The system recovers memory by deleting change records after their purpose is fulfilled, while position marks maintain references to the necessary state information to preserve position accuracy without retaining all intermediate change records.
Data Source
AI summary
A document is represented as a node tree in a document processing system. Edits to a node are represented in a change record that has a one-way link to the node. A text mark has a one-way link to the change record. It deletes that link when the changes represented by the change record are reflected in the text mark. A memory management system releases the memory allocated to the change record when no other object links to it.


