Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
Tiny Tiny RSS
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Server
Tiny Tiny RSS
Commits
a4e04c49
Commit
a4e04c49
authored
Jan 22, 2017
by
Andrew Dolgov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parse_counters: cache previous reply and skip processing of unchanged rows
parent
e1f7b05b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
js/feedlist.js
js/feedlist.js
+14
-3
No files found.
js/feedlist.js
View file @
a4e04c49
...
...
@@ -6,11 +6,12 @@ var _viewfeed_last = 0;
var
_viewfeed_timeout
=
false
;
var
counters_last_request
=
0
;
var
_counters_prev
=
[];
function
viewCategory
(
cat
)
{
/*
function viewCategory(cat) {
viewfeed({feed: cat, is_cat: true});
return false;
}
}
*/
function
loadMoreHeadlines
()
{
try
{
...
...
@@ -253,10 +254,18 @@ function request_counters(force) {
}
}
function
parse_counters
(
elems
,
scheduled_call
)
{
function
parse_counters
(
elems
)
{
try
{
for
(
var
l
=
0
;
l
<
elems
.
length
;
l
++
)
{
if
(
_counters_prev
[
l
]
&&
_counters_prev
[
l
].
id
==
elems
[
l
].
id
&&
_counters_prev
[
l
].
updated
==
elems
[
l
].
updated
&&
_counters_prev
[
l
].
counter
==
elems
[
l
].
counter
)
{
continue
;
}
var
id
=
elems
[
l
].
id
;
var
kind
=
elems
[
l
].
kind
;
var
ctr
=
parseInt
(
elems
[
l
].
counter
);
...
...
@@ -300,6 +309,8 @@ function parse_counters(elems, scheduled_call) {
hideOrShowFeeds
(
getInitParam
(
"
hide_read_feeds
"
)
==
1
);
_counters_prev
=
elems
;
}
catch
(
e
)
{
exception_error
(
"
parse_counters
"
,
e
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment