Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch scroll as read + reducing jQuery #2199

Merged
merged 7 commits into from
Dec 29, 2018

Conversation

Alkarex
Copy link
Member

@Alkarex Alkarex commented Dec 25, 2018

The overall goal is to improve performance, in particular on mobile and server-side.

In particular, this patch improves scroll performance when using the auto mark-as-read feature:
Mark-as-read requests are queued and sent max once per second. cd9a9a9

The scroll event listener is also rewritten to be much lighter caa893e

As the same time, in distinct commits, I have started some refactoring eefeb23 :

  • to start using ES6 syntax (limited to an IE11-subset)
  • to ensure that jQuery variable names start with a $ (to distinguish them),
  • and to avoid jQuery in easy cases (we might be able to soon avoid jQuery fully).

Prefix jQuery variables with $
Start avoiding jQuery in easy cases
Use let/const
Mark-as-read requests are queued and sent max once per second
@Alkarex Alkarex added this to the 1.14.0 milestone Dec 25, 2018
@Alkarex Alkarex added the Work in progress 🚧 Wait before merging label Dec 25, 2018
@Alkarex Alkarex added Work in progress 🚧 Wait before merging and removed Work in progress 🚧 Wait before merging labels Dec 26, 2018
@Alkarex Alkarex changed the title Batch scroll as read Batch scroll as read + reducing jQuery Dec 26, 2018
Much lighter rework: auto-mark-as-read, auto-remove-articles,
auto-load-more.
In particular, use a single onscroll event handler with a throtte.
Continue removing jQuery when possible.
@Alkarex Alkarex removed the Work in progress 🚧 Wait before merging label Dec 27, 2018
@Alkarex
Copy link
Member Author

Alkarex commented Dec 27, 2018

Resources when searching for standard JavaScript alternatives to jQuery:

@Alkarex Alkarex modified the milestones: 1.13.1, 1.14.0 Dec 27, 2018
@Alkarex Alkarex changed the base branch from dev to dev-1.14.0 December 29, 2018 10:33
@Alkarex Alkarex merged commit a0f1b76 into FreshRSS:dev-1.14.0 Dec 29, 2018
@Alkarex Alkarex deleted the batch-scroll-as-read branch December 29, 2018 10:33
@Alkarex
Copy link
Member Author

Alkarex commented Jan 14, 2019

@Frenzie
Copy link
Member

Frenzie commented Jan 14, 2019

Less often considered is the sheer waste that poor performance results in.

Funny, I never thought about performance as exclusion, but I've always thought of bad performance as a waste of my battery (and thus lifespan).

Alkarex added a commit to Alkarex/FreshRSS that referenced this pull request Jan 31, 2019
@Alkarex Alkarex mentioned this pull request Jan 31, 2019
Alkarex added a commit that referenced this pull request Feb 13, 2019
* Less jQuery

Follow-up of #2199

* Even less jQuery + global view unread title fix

* Even less jQuery

* Yet even less jQuery

* Even less jQuery

* Reduce some events

* Even less jQuery

* jQuery gone from main view

+Fixed English i18n

* Fix feed folded view

* Remove Firefox 64 workaround

Remove workaround for Gecko bug 1514498 in Firefox 64, fixed in Firefox
65

* Split to extra.js

Avoid loading unneeded JavaScript code for the main view.
+ several adjustements

* Improve CSS transition fold category

* Rewrite shortcuts

Remove library. Much faster, shorter, one listener instead of many.
Control of the shortcut context.
Fix #2215

* Remove debug

* Minor syntax

* Filter out unwanted shortcut modifiers

* Menu overflow fix

* Typo

* Fix unfolding in mobile view

* Remove jQuery from category.js

* Remove jQuery from Global view
@Alkarex Alkarex mentioned this pull request Mar 23, 2019
@Alkarex Alkarex mentioned this pull request May 28, 2019
11 tasks
javerous pushed a commit to javerous/FreshRSS that referenced this pull request Jan 20, 2020
javerous pushed a commit to javerous/FreshRSS that referenced this pull request Jan 20, 2020
* Less jQuery

Follow-up of FreshRSS#2199

* Even less jQuery + global view unread title fix

* Even less jQuery

* Yet even less jQuery

* Even less jQuery

* Reduce some events

* Even less jQuery

* jQuery gone from main view

+Fixed English i18n

* Fix feed folded view

* Remove Firefox 64 workaround

Remove workaround for Gecko bug 1514498 in Firefox 64, fixed in Firefox
65

* Split to extra.js

Avoid loading unneeded JavaScript code for the main view.
+ several adjustements

* Improve CSS transition fold category

* Rewrite shortcuts

Remove library. Much faster, shorter, one listener instead of many.
Control of the shortcut context.
Fix FreshRSS#2215

* Remove debug

* Minor syntax

* Filter out unwanted shortcut modifiers

* Menu overflow fix

* Typo

* Fix unfolding in mobile view

* Remove jQuery from category.js

* Remove jQuery from Global view
mdemoss pushed a commit to mdemoss/FreshRSS that referenced this pull request Mar 25, 2021
* Less jQuery

Follow-up of FreshRSS#2199

* Even less jQuery + global view unread title fix

* Even less jQuery

* Yet even less jQuery

* Even less jQuery

* Reduce some events

* Even less jQuery

* jQuery gone from main view

+Fixed English i18n

* Fix feed folded view

* Remove Firefox 64 workaround

Remove workaround for Gecko bug 1514498 in Firefox 64, fixed in Firefox
65

* Split to extra.js

Avoid loading unneeded JavaScript code for the main view.
+ several adjustements

* Improve CSS transition fold category

* Rewrite shortcuts

Remove library. Much faster, shorter, one listener instead of many.
Control of the shortcut context.
Fix FreshRSS#2215

* Remove debug

* Minor syntax

* Filter out unwanted shortcut modifiers

* Menu overflow fix

* Typo

* Fix unfolding in mobile view

* Remove jQuery from category.js

* Remove jQuery from Global view
@Frenzie Frenzie mentioned this pull request Apr 12, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants