-
Notifications
You must be signed in to change notification settings - Fork 342
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #302 from lemon24/296-memory
Memory usage reduction (#296)
- Loading branch information
Showing
7 changed files
with
743 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Changed | ||
------- | ||
|
||
* Use only a prefix of the feed to detect encodings, | ||
instead of reading the whole feed in memory. | ||
This reduces the memory usage of parse() by up to ~3x (66-73%), | ||
but may result in the wrong encoding being detected in rare cases; | ||
use ``feedparser.parse(optimistic_encoding_detection=False)`` | ||
to get the original behavior (read the whole feed in memory). | ||
(#296, #302) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.