Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit string parsing and manipulation to loading and saving #3

Open
cparker15 opened this issue Aug 28, 2011 · 0 comments
Open

Limit string parsing and manipulation to loading and saving #3

cparker15 opened this issue Aug 28, 2011 · 0 comments

Comments

@cparker15
Copy link
Owner

INI file data is currently parsed from the file contents every time GetValue(), SetValue(), GetSections(), or GetKeys() is called. Further, SetValue() completely rewrites portions of the file contents every time it is called. This is inefficient.

Instead, string parsing and manipulation should only occur when absolutely necessary: during loading and saving of the INI file. When the INI file is loaded, the string contents of the file should be parsed and loaded into data structures to represent the file's contents. When the INI file is saved, the data structures should be converted back into a string for persistence.

It would be much more efficient to look up sections and keys, add new sections and keys, or replace existing keys in a section, if they were all contained in collections, which can be indexed (for example, by using nested Dictionary objects).

@ghost ghost assigned cparker15 Aug 28, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant