Dataphor.org

Replace DataValue class with Native C# objects

Modified: 2009/07/22 16:22 by Bryn - Uncategorized
One of the main reasons for the introduction of the DataValue class was to provide a mechanism to model the run-time type of the object. While this is still necessary for generic support, it is no longer necessary for type-inheritance support, since that was dropped. In addition, a more efficient mechanism could be provided if type-inheritance support were reintroduced.

A potential area where memory consumption could be dramatically reduced is therefore the run-time stack itself. Rather than modeling run-time values using instances of a DataValue, the run-time values could be replaced with native C# values.

Most of these run-time values are value types such as integers and strings, so in addition to reducing the memory required, these values will now be stack-based instead of reference-based, with all the garbage collection overhead that incurs.

At least the following areas need to be considered and modified:
  • Run-Time Value Representations
    • Scalar
    • Row
    • ListValue
    • CursorValue
    • TableValue
  • Run-Time Context
    • Stack/Context structures
  • CLI
    • Standard CLI
    • Local Server
    • Native CLI
  • Stream Support
  • Device Marshalling

Edit

Memory Footprint

Edit

Profile Reporting

ScrewTurn Wiki version 2.0.36. Some of the icons created by FamFamFam.