Skip to content

Cashing CEquivalentLayer data in CMultiPaneBSDF #232

@vidanovic

Description

@vidanovic

The program was previously caching the union of spectral data for each layer in the CMultiPaneBSDF. This approach led to excessive memory usage because all matrices were computed before the user had a chance to request a reduction in the number of wavelengths for multilayer calculations.

The benefit of this design was that the same CMultiPaneBSDF instance could be reused across different standards without losing any underlying data. However, due to memory limitations in WINDOW (a 32-bit application limited to 4 GB), this approach often caused crashes when processing multiple records.

To mitigate this, I was forced to reduce the number of wavelengths before saving the data into the CEquivalentLayer. The downside is that users can no longer change the calculation method while retaining the exact same starting point, which can introduce small differences in results. This is especially noticeable when switching from a condensed to a full spectrum—results will be less accurate because the condensed-spectrum step already discarded some data.

This limitation can be addressed through an alternative implementation, which I estimate would require a medium-sized effort.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions