Skip to content

Conversation

@MarkRSill
Copy link
Collaborator

I found that once a JSON document was loaded into MemoJSON than the Action List Update calls were checking JSON IsValid continuously causing high CPU usage and when the JSON is valid, the parsed JSON object in IsValid was leaked which quickly leads to an Out of Memory error. The suggested change is to only validate the JSON when MemoJSON has been changed as well as free the leaked TJSONObject in TPkgJsonMapper.IsValid. To test, paste a sizable valid JSON doc in the memo and watch CPU and memory. Out of Memory errors occurred pretty quickly in my testing of sizeable JSON content.
SampleJSON.zip

…U usage and when JSON is valid, the parsed JSON response is leaked leading to Out of Memory error. Suggested change to only validate JSON on MemoJSON changed and free the leaked TJSONObject in TPkgJsonMapper.IsValid. ARC has been deprecated, so instances need to be managed.
@JensBorrisholt JensBorrisholt merged commit 51c4031 into Development Mar 28, 2021
@MarkRSill MarkRSill deleted the Issue-out-of-memory branch March 29, 2021 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants