Skip to content

Commit 924c8f9

Browse files
dbup365labs
authored andcommitted
empty the raw response string after parsing (#1588)
Data between string and parsed array duplicates the memory consumption.
1 parent 0cb203d commit 924c8f9

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ All notable changes to this project will be documented in this file based on the
1616

1717
### Improvements
1818

19+
* Reduced memory footprint of response by not keeping the raw JSON data when JSON after JSON has been parsed. [#1588](https://github.com/ruflin/Elastica/pull/1588)
20+
1921
### Deprecated
2022

2123
## [6.1.0](https://github.com/ruflin/Elastica/compare/6.0.2...6.1.0)

lib/Elastica/Response.php

+1
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ public function getData()
235235
}
236236

237237
$this->_response = $response;
238+
$this->_responseString = '';
238239
}
239240

240241
return $this->_response;

0 commit comments

Comments
 (0)