Stream JSON export

Avoid large in-memory copies
https://github.com/FreshRSS/FreshRSS/issues/1372
This commit is contained in:
Alexandre Alapetite
2016-11-15 20:43:06 +01:00
parent f3d5cbd7da
commit f59de4e2b6
3 changed files with 78 additions and 60 deletions

View File

@@ -641,13 +641,13 @@ class FreshRSS_importExport_Controller extends Minz_ActionController {
$this->view->list_title = _t('sub.import_export.starred_list');
$this->view->type = 'starred';
$unread_fav = $this->entryDAO->countUnreadReadFavorites();
$this->view->entries = $this->entryDAO->listWhere(
$this->view->entriesRaw = $this->entryDAO->listWhereRaw(
's', '', FreshRSS_Entry::STATE_ALL, 'ASC', $unread_fav['all']
);
} elseif ($type === 'feed' && $feed != null) {
$this->view->list_title = _t('sub.import_export.feed_list', $feed->name());
$this->view->type = 'feed/' . $feed->id();
$this->view->entries = $this->entryDAO->listWhere(
$this->view->entriesRaw = $this->entryDAO->listWhereRaw(
'f', $feed->id(), FreshRSS_Entry::STATE_ALL, 'ASC',
$maxFeedEntries
);