wallabag is a self hostable application for saving web pages: Save and classify articles. Read them later. Freely.
Find a file
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
.github dependabot: change schedule to check updates once a month 2021-05-03 13:30:34 +02:00
app Update npm/yarn dependencies 2021-08-05 22:51:23 +02:00
bin Cleanup 2018-11-28 22:04:54 +01:00
data/db Remove data sql files 2017-11-21 21:35:17 +01:00
docker Update env 2019-12-31 09:19:02 +01:00
scripts Fix link to composer installation requirements 2020-07-25 15:32:27 +02:00
src Improve performance of REST exists call 2021-08-05 23:19:08 +02:00
tests/Wallabag Fixed unavailable russian website in test 2021-08-03 07:56:14 +02:00
var Removing failing test from Travis 2018-08-19 16:38:48 +02:00
web Update assets 2021-08-05 22:51:23 +02:00
.babelrc Upgrade to NodeJS 12 2020-08-25 12:28:12 +02:00
.composer-auth.json Replace token by a no scope one 2016-02-27 14:07:04 +01:00
.editorconfig Ditch Travis to use GitHub Actions 2020-11-27 14:14:44 +01:00
.eslintrc.json Update npm/yarn dependencies 2021-08-05 22:51:23 +02:00
.gitignore Remove support for PHP < 7.2 2020-06-15 08:25:59 +02:00
.php_cs Update .php_cs 2020-11-25 08:46:45 +01:00
.scrutinizer.yml Force PHP version on Scrutinizer 2021-01-11 10:02:58 +01:00
.stylelintrc Webpack upgraded from 4 to 5 + dependancies updated 2020-11-24 22:28:52 +01:00
CHANGELOG.md Prepare 2.4.2 release 2021-03-16 09:23:37 +01:00
CODE_OF_CONDUCT.md Create code of conduct 2019-10-08 09:50:06 +02:00
composer.json Bump pragmarx/recovery from 0.1.0 to 0.2.0 2021-03-24 03:04:36 +00:00
composer.lock Update compose.lock 2021-08-05 22:51:23 +02:00
COPYING.md Cleanup 2018-11-28 22:04:54 +01:00
CREDITS.md some cleanup: 2016-01-15 16:07:57 +01:00
docker-compose.yml cosmetic changes: 2020-01-25 16:16:43 +01:00
GNUmakefile Update assets 2020-10-08 10:08:51 +02:00
Makefile Makefile fixes for non GNU systems 2018-08-18 18:50:18 +10:00
package.json Update npm/yarn dependencies 2021-08-05 22:51:23 +02:00
phpstan.neon Update phpunit dep for phpstan 2021-08-05 22:51:23 +02:00
phpunit.xml.dist Cleanup 2018-11-28 22:04:54 +01:00
README.md Ditch Travis to use GitHub Actions 2020-11-27 14:14:44 +01:00
RELEASE_PROCESS.md Update release process and introduce 2.4.1-dev 2020-12-10 15:01:47 +01:00
webpack.config.js Webpack upgraded from 4 to 5 + dependancies updated 2020-11-24 22:28:52 +01:00
yarn.lock Update npm/yarn dependencies 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.