Commit Graph

39 Commits

Author SHA1 Message Date
Alexandre Alapetite
50075bfbdc Improvement for ASC order
https://github.com/marienfressinaud/FreshRSS/issues/495
2014-08-19 20:58:18 +02:00
Alexandre Alapetite
65d6796e92 First bug for old articles first
https://github.com/marienfressinaud/FreshRSS/issues/495
2014-08-07 11:29:19 +02:00
Marien Fressinaud
d5d3f6dcfa Fix bugs in import/export
- EntryDAO.php: add a missing "FreshRSS_EntryDAO::"
- Fix htmlspecialchars in opml export
2014-07-23 23:56:16 +02:00
Alexandre Alapetite
3403af3050 SQL: Bug with order ASC
https://github.com/marienfressinaud/FreshRSS/issues/538
2014-07-17 11:56:15 +02:00
Alexandre Alapetite
6c83264f83 SQL: MySQL speed optimisation
Would be nice to test with other versions of MySQL too.

Comparison before/after:

mysql> EXPLAIN SELECT e.id, e.guid, e.title, e.author,
UNCOMPRESS(content_bin) AS content, e.link, e.date, e.is_read,
e.is_favorite, e.id_feed, e.tags FROM `freshrss_alex_entry` e INNER JOIN
(SELECT e1.id FROM `freshrss_alex_entry` e1 INNER JOIN
`freshrss_alex_feed` f ON e1.id_feed=f.id WHERE f.priority > 0 AND
(e1.id >= 1381615200000000 OR e1.is_read=0 OR e1.is_favorite=1 OR
(f.keep_history <> 0)) ORDER BY e1.id DESC LIMIT 31) e2 ON e2.id=e.id
ORDER BY e.id DESC;

+----+-------------+------------+--------+-------------------------------------+----------+---------+---------------+------+----------------------------------------------+
| id | select_type | table      | type   | possible_keys
| key      | key_len | ref           | rows | Extra
|

+----+-------------+------------+--------+-------------------------------------+----------+---------+---------------+------+----------------------------------------------+
|  1 | PRIMARY     | <derived2> | ALL    | NULL
| NULL     | NULL    | NULL          |   31 | Using temporary; Using
filesort              |
|  1 | PRIMARY     | e          | eq_ref | PRIMARY
| PRIMARY  | 8       | e2.id         |    1 |
|
|  2 | DERIVED     | f          | range  | PRIMARY,priority,keep_history
| priority | 1       | NULL          |  137 | Using where; Using
temporary; Using filesort |
|  2 | DERIVED     | e1         | ref    |
PRIMARY,id_feed,is_favorite,is_read | id_feed  | 2       | freshrss.f.id
|  452 | Using where                                  |

+----+-------------+------------+--------+-------------------------------------+----------+---------+---------------+------+----------------------------------------------+
4 rows in set (3.50 sec)

mysql> EXPLAIN SELECT e.id, e.guid, e.title, e.author,
UNCOMPRESS(content_bin) AS content, e.link, e.date, e.is_read,
e.is_favorite, e.id_feed, e.tags FROM `freshrss_alex_entry` e INNER JOIN
(SELECT e1.id FROM `freshrss_alex_entry` e1 INNER JOIN
`freshrss_alex_feed` f ON e1.id_feed=f.id WHERE f.priority > 0 AND e1.id
<=9000000000000000 AND (e1.id >= 1381615200000000 OR e1.is_read=0 OR
e1.is_favorite=1 OR (f.keep_history <> 0)) ORDER BY e1.id DESC LIMIT 31)
e2 ON e2.id=e.id ORDER BY e.id DESC;

+----+-------------+------------+--------+-------------------------------------+---------+---------+---------------------+-------+---------------------------------+
| id | select_type | table      | type   | possible_keys
| key     | key_len | ref                 | rows  | Extra
|

+----+-------------+------------+--------+-------------------------------------+---------+---------+---------------------+-------+---------------------------------+
|  1 | PRIMARY     | <derived2> | ALL    | NULL
| NULL    | NULL    | NULL                |    31 | Using temporary;
Using filesort |
|  1 | PRIMARY     | e          | eq_ref | PRIMARY
| PRIMARY | 8       | e2.id               |     1 |
|
|  2 | DERIVED     | e1         | range  |
PRIMARY,id_feed,is_favorite,is_read | PRIMARY | 8       | NULL
| 70084 | Using where                     |
|  2 | DERIVED     | f          | eq_ref | PRIMARY,priority,keep_history
| PRIMARY | 2       | freshrss.e1.id_feed |     1 | Using where
|

+----+-------------+------------+--------+-------------------------------------+---------+---------+---------------------+-------+---------------------------------+
4 rows in set (0.01 sec)
2014-07-10 15:49:51 +02:00
Alexandre Alapetite
0f842c1aea SQL: removed superfluous transactions to avoid some dead locks 2014-07-08 14:14:02 +02:00
Alexandre Alapetite
439a0e2991 SQL: improved performance for adding new articles 2014-07-07 18:25:48 +02:00
Alexandre Alapetite
805c91da98 Add support for SQLite
https://github.com/marienfressinaud/FreshRSS/issues/100
Warning: MySQL has been changed too, so bugs may have been introduced
2014-07-05 01:52:41 +02:00
Alexandre Alapetite
d6f4141086 Preparation for SQLite
https://github.com/marienfressinaud/FreshRSS/issues/100
2014-07-03 21:26:30 +02:00
Alexandre Alapetite
d1b31b1a61 Search order of filters
For now, process them in the same order as specified by the user
Specifying for instance `date:` first will be much faster than
specifying a free text word first.
https://github.com/marienfressinaud/FreshRSS/issues/511
2014-06-01 15:23:30 +02:00
Alexandre Alapetite
ecac55d3d3 New search system, including date: and pubdate: and combination
Now also accepts combination of #tag and intitle: and inurl: and author:
and the new date: and pubdate:
https://github.com/marienfressinaud/FreshRSS/issues/511
Each search prefix stop at the first space (we should add a possibility
to have quotes for multiple words)
So if you want two words in title, write "intitle:word1 intitle:word2"

Examples of dates:
date:2014
date:2014-02/2014-04 or date:201402/201404
date:P1W for the last week
2014-06-01 14:40:38 +02:00
Alexandre Alapetite
f25783ef5d Minor syntax changes for: New toggle buttons to filter articles
See
http://programmers.stackexchange.com/questions/23852/bitwise-or-vs-adding-flags
https://github.com/marienfressinaud/FreshRSS/pull/486
https://github.com/marienfressinaud/FreshRSS/issues/376
2014-04-15 12:16:31 +02:00
Alexis Degrugillier
3a736e902c Move state constants from Configuration to Entry 2014-04-13 08:16:43 -04:00
Alexis Degrugillier
cd87e2000a Revert deletion of the favorite actions 2014-04-13 07:35:17 -04:00
Alexis Degrugillier
86066b1659 Add a new status for 'ALL'
I made the conversion in every file I can think of.
It should not have any reference to the string 'all' for the state context
2014-04-13 07:28:41 -04:00
Alexis Degrugillier
3e665bcf9a Delete favorite button
I extract drop-down menu actions to make them as button action in the page header.
I removed the favorite button on the category list because it is a duplicate from the button action.
Now button action act as filters and you can combine them.

It is a test to see if we can keep it like that. There is still work to do to extract other actions from the drop-down list.
I did not want to change everything if we don't keep it.

See #376 and #277
2014-04-12 11:51:44 -04:00
Marien Fressinaud
779afe9c4e Import of articles is implemented!
- Remove massiveImportAction and addCategories from FeedController
- Fix typo for some methods (camelCase)
- addCategoryObject and addFeedObject return id if corresponding object already
  exists in DB
- introduce addEntryObject. Return -1 if Entry already exist (in order to keep
  quite good performances)
- Complete importArticles method

Need some more tests + better performance
2014-03-30 14:28:13 +02:00
Alexandre Alapetite
fc6769c1b1 API: Add continuation mode
https://github.com/marienfressinaud/FreshRSS/issues/443
Needed for e.g. EasyRSS
2014-03-03 21:25:14 +01:00
Alexandre Alapetite
00774f5a0b API : SQL optimisation WHERE ... IN, and better compatibility EasyRSS
https://github.com/marienfressinaud/FreshRSS/issues/13
2014-03-02 11:54:52 +01:00
Alexandre Alapetite
71f7ce1be5 API: SQL optimisation
https://github.com/marienfressinaud/FreshRSS/issues/13
2014-03-01 15:47:15 +01:00
Alexandre Alapetite
f44683b567 API streamContents for categories and feeds
https://github.com/marienfressinaud/FreshRSS/issues/13
2014-02-28 20:22:50 +01:00
Alexandre Alapetite
6dffb8706f Alpha version of Google Reader compatible API
https://github.com/marienfressinaud/FreshRSS/issues/13
Hardcoded passwords, no possibility to add/delete feeds or edit
categories yet.
2014-02-27 22:48:11 +01:00
Alexandre Alapetite
7313f9f3a3 Bug "mark all as read" when using DESC and pagination and no scroll
https://github.com/marienfressinaud/FreshRSS/issues/431#issuecomment-35774488
2014-02-21 22:32:29 +01:00
Alexis Degrugillier
46a5bdea25 Ajout d'un filtre sur les articles lus
Ajout d'un filtre sur les articles favoris
2014-01-08 00:05:00 -05:00
Alexandre Alapetite
4a19676cf2 Compatibilité MySQL 5.5 Windows
Testé vite fait avec MySQL 5.5 sous Windows, et les chaînes vides ''
utilisées jusqu'à présent dans le cas de booléens faux causaient une
erreur.
Vérifier s'il n'y a pas d'autres exemples ailleurs dans le code
2014-01-05 02:25:56 +01:00
Alexandre Alapetite
c2375265c0 Fin taille historique
Permet d'éviter les problèmes de flux vides à l'importation
https://github.com/marienfressinaud/FreshRSS/issues/332 , ou de nombre
d'articles non-lus qui ne correspondent pas au nombre d'articles
affichés
2013-12-25 18:18:14 +01:00
Alexandre Alapetite
06d4b8d102 Option globale pour la taille minimale de l'historique par défaut
Plus une réorganisation des options
2013-12-25 17:37:52 +01:00
Alexandre Alapetite
87bfa195a6 Permet de configurer plus finement le nombre d’articles minimum à conserver par flux 2013-12-24 01:21:11 +01:00
Alexandre Alapetite
7b7acf5c87 Synchronisation quelques lignes blanches 2013-12-23 13:35:54 +01:00
Alexandre Alapetite
6b7d96d0ea Refactorisation : correction classes oubliées 2013-12-19 21:19:45 +01:00
Alexandre Alapetite
e29be10556 Recherches spéciales intitle: ou inurl: ou author:
Permet de chercher en utilisant intitle: ou inurl: ou author: comme dans
certains moteurs de recherche. Pour l'instant, un seul de ces mots clefs
à la fois peut être spécifié en tout début de chaîne de recherche et
sera appliqué à l'ensemble du reste de la recherche.
NB: À ajouter à la documentation, wiki
2013-12-16 22:22:56 +01:00
Alexandre Alapetite
ba71d7747a SQL : permet recherche du caractère dièse 2013-12-16 22:03:16 +01:00
Alexandre Alapetite
a1f8bade61 SQL : petits changement recherche
Traite mieux les caractères spéciaux.
Permet par exemple une recherche sur des mots contenant des apostrophes,
ou le signe pourcentage, etc.
Il faudra toujours essayer d'améliorer la recherche en particulier
lorsque plusieurs mots sont fournis
2013-12-16 21:58:47 +01:00
Alexandre Alapetite
8abeeaf65e SQL : correction recherche
Oups, mon précédent changement SQL avait cassé la recherche.
Patch rapide en attendant une ré-optimisation en particulier pour le cas
de recherche sur plusieurs mots
2013-12-16 17:45:57 +01:00
Alexandre Alapetite
529d6bcd15 SQL : performances
Tentative de reformulation de la requête principale pour améliorer les
performances.
Utilisation d'une sous-jointure qui retourne uniquement e.id.
Sur mon serveur avec 13000 articles, la requête de la page d'accueil
sans article non lu mettait 1.38s avant le patch, contre 0.08s après (en
désactivant bien sûr le cache SQL).

Il faudra re-tester et tenter d'autres optimisations (notamment sur les
index) avec un nombre d'articles plus important.

Avant :
SELECT SQL_NO_CACHE e.id, e.guid, e.title, e.author,
UNCOMPRESS(e.content_bin) AS content, e.link, e.date, e.is_read,
e.is_favorite, e.id_feed, e.tags FROM `freshrss_alex_entry` e INNER JOIN
`freshrss_alex_feed` f ON e.id_feed = f.id WHERE f.priority > 0 AND
(e.id >= 1371597014000000 OR e.is_favorite = 1 OR f.keep_history = 1)
ORDER BY e.id DESC LIMIT 33;

Après :
SELECT SQL_NO_CACHE e.id, e.guid, e.title, e.author,
UNCOMPRESS(e.content_bin) AS content, e.link, e.date, e.is_read,
e.is_favorite, e.id_feed, e.tags FROM `freshrss_alex_entry` e INNER JOIN
(SELECT e1.id FROM `freshrss_alex_entry` e1 INNER JOIN
`freshrss_alex_feed` f ON e1.id_feed = f.id WHERE f.priority > 0 AND
(e1.id >= 1371597014000000 OR e1.is_favorite = 1 OR f.keep_history = 1)
ORDER BY e1.id DESC LIMIT 33) e2 ON e2.id = e.id ORDER BY e.id DESC;
2013-12-16 00:50:24 +01:00
Alexandre Alapetite
a2421185d0 SQL : Petite amélioration de la requête principale
En particulier pour les favoris, où cela évite une jointure.
2013-12-15 16:01:37 +01:00
Alexandre Alapetite
74bceb2e2c Date minimum : cas des favoris et de l'historique complet
Suite de https://github.com/marienfressinaud/FreshRSS/issues/323
2013-12-15 04:20:23 +01:00
Alexandre Alapetite
7e64cda415 Date minimum pour afficher les articles
Implémente décision
https://github.com/marienfressinaud/FreshRSS/issues/323
2013-12-15 04:07:12 +01:00
Alexandre Alapetite
878e96202e Grosse refactorisation pour permettre le chargement automatique des classes
C'est parti de changements pour
https://github.com/marienfressinaud/FreshRSS/issues/255 et finalement
j'ai continué la refactorisation...

Ajout de préfixes FreshRSS_ et Minz_ sur le modèle de SimplePie_.
Toutes les classes sont maintenant en chargement automatique (devrait
améliorer les performances en évitant de charger plein de classes
inutilisées, et faciliter la maintenance).
Suppression de set_include_path().
Si souhaité, certaines classes de Minz pourraient être déplacées dans un
sous-répertoire, par exemple les exceptions.

Tests et relecture nécessaires.
2013-12-15 03:30:24 +01:00