[V3] Directory Loading and Begin Implementing Lazy-Loading
Author: project-laguardiaCreated Jul 26, 2025Updated Aug 5, 2025
Labelsenhancement
Problem:
As it stands, Dasel does not lazy load to any extent, which can cause performance issues for large datasets.
Solution (Getter-Setters):
Dasel already has groundwork implemented for dynamically-loading properties (implemented for orderedmaps) in model.Value:
- https://github.com/TomWright/dasel/blob/5ac2dab3c95476c27de0026f5ea2a12be384523e/model/value_map.go#L85-L127
- https://github.com/TomWright/dasel/blob/5ac2dab3c95476c27de0026f5ea2a12be384523e/model/value_map.go#L41-L60
Using this existing getter-setter structure, you could add support for lazily-loaded types that only load into memory on demand.
Use Case: Directory Loading
A simplistic first use-case would be directory loading. When parsing the directory, you first only load the directory tree into memory as a map. Then when leaves (files) are accessed, you load those on demand. This would give you a poor man's lazy-loading method for large datasets by allowing end users to segment their files.
Source: TomWright/dasel