diff options
| author | 2013-09-02 22:06:51 +0200 | |
|---|---|---|
| committer | 2013-09-02 22:06:51 +0200 | |
| commit | f855dbdca6e95ac367b7a9dae9d3a866e1f85d37 (patch) | |
| tree | b56089793ec4b41414f3e7574295684bae5170ff /app/views/helpers/view/reader_view.phtml | |
| parent | 31a6a13268023a2db5eba2445ee6c7db4a6d9623 (diff) | |
SQL and model optimisation
Big effect (on speed and memory), but few changes :-)
Drastically reduced the number of SQL requests needed (from 233 down to
8 to load the home page with my own data set = 140 feeds in 15
categories).
Drastically reduced the amount of data transferred from MySQL to PHP.
Diffstat (limited to 'app/views/helpers/view/reader_view.phtml')
| -rw-r--r-- | app/views/helpers/view/reader_view.phtml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/views/helpers/view/reader_view.phtml b/app/views/helpers/view/reader_view.phtml index 46a65a4e3..7b1e2bca0 100644 --- a/app/views/helpers/view/reader_view.phtml +++ b/app/views/helpers/view/reader_view.phtml @@ -11,7 +11,10 @@ if (isset ($this->entryPaginator) && !$this->entryPaginator->isEmpty ()) { <div class="flux<?php echo !$item->isRead () ? ' not_read' : ''; ?><?php echo $item->isFavorite () ? ' favorite' : ''; ?>" id="flux_<?php echo $item->id (); ?>"> <div class="flux_content"> <div class="content"> - <?php $feed = $item->feed (true); ?> + <?php + $feed = HelperCategory::findFeed($this->cat_aside, $item->feed ()); //We most likely already have the feed object in cache + if (empty($feed)) $feed = $item->feed (true); + ?> <a href="<?php echo $item->link (); ?>"> <img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="" /> <span><?php echo $feed->name (); ?></span> </a> |
