Skip to content

data seems to be stored too frequently. #3

@ncdulo

Description

@ncdulo

Giving the current state of the code a look-over, I noticed a lot of calls where the CSV data read from disk is stored or copied frequently. This seems due to making different local copies, or not utilizing already existing class members. For example, the Data_Reader class does some basic checking and maintains it's own copy of the data to ensure the file is only read once. However, each time we use that data in a method such as display(), edit(), or create(), we make another copy of that data.

The performance hit for now is likely negligible. But when we have hundreds, thousands, more rows of data? It will add up quickly. Thought should be given to what an effective method would be to ensure we only copy the data when we need to. Keeping a cache of the data and only updating it when the file is modified seems like a good first candidate. We should make an effort to profile and track memory use, and performance as we test.

This issue is to signify an implementation of a more efficient and proper handling of the data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions