[JIRA] (JENKINS-62129) ajaxExecutors/ajaxBuildQueue posted even when pane is collapsed

13 views
Skip to first unread message

jglick@cloudbees.com (JIRA)

unread,
Apr 30, 2020, 1:16:02 PM4/30/20
to jenkinsc...@googlegroups.com
Jesse Glick started work on Bug JENKINS-62129
 
Change By: Jesse Glick
Status: Open In Progress
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

jglick@cloudbees.com (JIRA)

unread,
Apr 30, 2020, 1:16:02 PM4/30/20
to jenkinsc...@googlegroups.com
Jesse Glick created an issue
 
Jenkins / Bug JENKINS-62129
ajaxExecutors/ajaxBuildQueue posted even when pane is collapsed
Issue Type: Bug Bug
Assignee: Jesse Glick
Components: core
Created: 2020-04-30 17:15
Labels: performance lts-candidate
Priority: Major Major
Reporter: Jesse Glick

Normally Jenkins will post to ajaxBuildQueue and ajaxExecutors every few seconds to refresh these widgets. If you click the - button to collapse them, the results are not displayed...but the web requests are still sent, putting load on the master! We should just skip the refresh on a collapsed pane.

Note that toggling the collapsed state involves a page refresh, so there is no risk of missing updates if you click + to expand.

jglick@cloudbees.com (JIRA)

unread,
Apr 30, 2020, 1:27:02 PM4/30/20
to jenkinsc...@googlegroups.com
Jesse Glick resolved as Won't Fix
 

I was trying

diff --git core/src/main/resources/lib/hudson/executors.jelly core/src/main/resources/lib/hudson/executors.jelly
index 4cd01bcadd..62eb9d3276 100644
--- core/src/main/resources/lib/hudson/executors.jelly
+++ core/src/main/resources/lib/hudson/executors.jelly
@@ -155,7 +155,7 @@ THE SOFTWARE.
       </j:forEach>
     </l:pane>
     <!-- schedule updates only for the full page reload -->
-    <j:if test="${ajax==null and h.hasPermission(app.READ)}">
+    <j:if test="${ajax==null and h.hasPermission(app.READ) and not h.isCollapsed('executors')}">
       <script defer="defer">
         refreshPart('executors',"${rootURL}/${h.hasView(it,'ajaxExecutors')?it.url:''}ajaxExecutors");
       </script>
diff --git core/src/main/resources/lib/hudson/queue.jelly core/src/main/resources/lib/hudson/queue.jelly
index 776c4ed46a..93b6eb5560 100644
--- core/src/main/resources/lib/hudson/queue.jelly
+++ core/src/main/resources/lib/hudson/queue.jelly
@@ -101,7 +101,7 @@ THE SOFTWARE.
     </j:choose>
   </l:pane>
   <!-- schedule updates only for the full page reload -->
-  <j:if test="${ajax==null and h.hasPermission(app.READ)}">
+  <j:if test="${ajax==null and h.hasPermission(app.READ) and not h.isCollapsed('buildQueue')}">
     <script defer="defer">
       refreshPart('buildQueue',"${rootURL}/${h.hasView(it,'ajaxBuildQueue')?it.url:''}ajaxBuildQueue");
     </script>

until I realized that the original feature included dynamic updates to the pane titles, which still require HTTP requests to the master. Perhaps those should be dropped, to minimize load, but this would be a minor functional regression. And a three-way toggle (full, minimized, nonrefreshing) seems too awkward. The best we could do is slow down the refresh to, say, once per minute when minimized? Or use a lighter-weight REST call that does not involve rendering HTML?

Change By: Jesse Glick
Status: In Progress Resolved
Resolution: Won't Fix

jglick@cloudbees.com (JIRA)

unread,
Apr 30, 2020, 1:27:02 PM4/30/20
to jenkinsc...@googlegroups.com
Jesse Glick updated an issue
Change By: Jesse Glick
Labels: lts-candidate performance
Reply all
Reply to author
Forward
0 new messages