Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Angelo Compagnucci <angelo.compagnucci@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] docs/website: Speedup javascript query
Date: Wed, 22 Feb 2017 21:03:47 +0100	[thread overview]
Message-ID: <1487793827-9204-1-git-send-email-angelo.compagnucci@gmail.com> (raw)

This commit limits results from the javascript
query for selecting messages from mailinglist.
It was not limited before.

Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
---
 docs/website/js/buildroot.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/docs/website/js/buildroot.js b/docs/website/js/buildroot.js
index da43664..a30da63 100644
--- a/docs/website/js/buildroot.js
+++ b/docs/website/js/buildroot.js
@@ -1,7 +1,7 @@
 function load_activity(feedurl, divid) {
     var yqlURL = "https://query.yahooapis.com/v1/public/yql";
-    var yqlQS = "?q=select%20*%20from%20xml%20where%20url%20%3D%20'";
-    var yqlOPTS = "'&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback=";
+    var yqlQS = "?q=select%20entry%20from%20xml%20where%20url%20%3D%20'";
+    var yqlOPTS = "'%20limit%2010&format=json&callback=";
     var container = document.getElementById(divid);
     var url = yqlURL + yqlQS + encodeURIComponent(feedurl) + yqlOPTS;
 
@@ -10,8 +10,8 @@ function load_activity(feedurl, divid) {
         var loaded = 0;
         var nb_display = 8;
         if (result==null) return;
-        for (var i = 0; i < result.feed.entry.length; i++) {
-            var entry = result.feed.entry[i];
+        for (var i = 0; i < result.feed.length; i++) {
+            var entry = result.feed[i].entry;
             if (entry.title.indexOf("git commit") != -1)
                 continue;
             loaded += 1;
-- 
2.7.4

             reply	other threads:[~2017-02-22 20:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-22 20:03 Angelo Compagnucci [this message]
2017-02-22 20:31 ` [Buildroot] [PATCH] docs/website: Speedup javascript query Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1487793827-9204-1-git-send-email-angelo.compagnucci@gmail.com \
    --to=angelo.compagnucci@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox