Kevin Decherf 19802d8bd5 Improve performance of REST exists call
I've noticed that the endpoint `/api/entries/exists` used by the "Sweep
articles" feature on the Android app failed almost all the time on my
instance.

After checking the corresponding method I found that
`EntryRestController::getEntriesExistsAction()` could be improved.

Here is the former way the method worked:

```
for id in [list of ids]
  get full entry by id
  if null
    get full entry by given id

return array of ids or array of hashes
```

With this behavior on my instance I could expect up to 13k SQL requests
when sweeping articles from the Android app. Morever the repository
fetches all fields (content included) while the method only returns ids
or hashes.

The new behavior is described as follow:

```
get ids, hashes by [list of ids]
merge with provided [list of ids] // this part will complete the final
                                  // array with not found ids

return array of ids or array of hashes
```

In my case this change reduces the number of SQL requests to only 135
(_considering one request for 50 articles_)

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2021-08-05 23:19:08 +02:00
2021-08-05 22:51:23 +02:00
2018-11-28 22:04:54 +01:00
2017-11-21 21:35:17 +01:00
2019-12-31 09:19:02 +01:00
2018-08-19 16:38:48 +02:00
2021-08-05 22:51:23 +02:00
2020-08-25 12:28:12 +02:00
2021-08-05 22:51:23 +02:00
2020-06-15 08:25:59 +02:00
2020-11-25 08:46:45 +01:00
2021-03-16 09:23:37 +01:00
2019-10-08 09:50:06 +02:00
2021-08-05 22:51:23 +02:00
2018-11-28 22:04:54 +01:00
2016-01-15 16:07:57 +01:00
2020-01-25 16:16:43 +01:00
2020-10-08 10:08:51 +02:00
2018-08-18 18:50:18 +10:00
2021-08-05 22:51:23 +02:00
2021-08-05 22:51:23 +02:00
2018-11-28 22:04:54 +01:00
2020-11-27 14:14:44 +01:00
2021-08-05 22:51:23 +02:00

CI Scrutinizer Code Quality Gitter Donation Status Translation status

What is wallabag?

wallabag is a self-hostable PHP application allowing you to not miss any content anymore. Click, save and read it when you can. It extracts content so that you can read it when you have time.

More information on our website: wallabag.org.

If you do not have your own server, consider the wallabag.it hosting solution.

Install wallabag

Please read the documentation to see the wallabag requirements.

Then you can install wallabag by executing the following commands:

git clone https://github.com/wallabag/wallabag.git
cd wallabag && make install

Now, configure a virtual host to use your wallabag.

Run on YunoHost

Install Wallabag with YunoHost

Wallabag app for YunoHost. See here

Translate wallabag

wallabag is being translated using Weblate, a web tool designed to ease translating for both developers and translators. Feel free to help us translate wallabag!

License

Copyright © 2013-current Nicolas Lœuillet nicolas@loeuillet.org This work is free. You can redistribute it and/or modify it under the terms of the MIT License. See the COPYING file for more details.

Description
wallabag is a self hostable application for saving web pages: Save and classify articles. Read them later. Freely.
Readme 160 MiB
2023-12-16 17:38:45 +01:00
Languages
PHP 82.7%
Twig 13%
SCSS 2%
JavaScript 1.8%
Shell 0.3%
Other 0.2%