You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@johnzon.apache.org by GitBox <gi...@apache.org> on 2019/09/21 16:00:53 UTC
[GitHub] [johnzon] mkarg opened a new pull request #46: Enhancement
[JOHNZON-278] Return constant instead of new instance of empty block /
empty array
mkarg opened a new pull request #46: Enhancement [JOHNZON-278] Return constant instead of new instance of empty block / empty array
URL: https://github.com/apache/johnzon/pull/46
Even in these days of modern Java, reducing memory consumption, GC stress and memory fragmentation, are beneficial side aspects.
If makes no sense to create new **empty** instances of JsonArray and JsonObject again and again. For this case, JSON-P provides special **constants**.
It makes sense to return these constants always.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services