• pacific, 1.0-b05/b-06

      Please see JENKINS-38079 for details.

      *SSE configure call takes really long time (~10sec) for job channel subscription
      (there are two 'job' subscriptions)
      "subscribe": [

      { "jenkins_channel": "job" }

      ,

      { "jenkins_channel": "job" }

      ],
      *SSE configure for pipeline channel is relatively less but still long time (3-4 sec)
      *Avoid redirection by appending ‘/‘. GET /js-extensions costs 61ms
      *(Run details page calls SSE configure API 5 times each taking on average ~2secs.

          [JENKINS-38252] SSE channel registration takes long time

          James Dumay added a comment -

          FYI tfennelly tracking performance for SSE here.

          James Dumay added a comment - FYI tfennelly tracking performance for SSE here.

          Tom FENNELLY added a comment -

          I honestly think this is down to something else starving requests like this from getting a service thread. That said ... I'm going to refactor the config path so as to remove the lock on the session object, which would only block on multiple requests from the same client i.e. would not block across clients.

          Tom FENNELLY added a comment - I honestly think this is down to something else starving requests like this from getting a service thread. That said ... I'm going to refactor the config path so as to remove the lock on the session object, which would only block on multiple requests from the same client i.e. would not block across clients.

          James Dumay added a comment -

          tfennelly sounds like a good first step to deduce whats going on there. If we can rule out locking at least we can investigate down another route.

          James Dumay added a comment - tfennelly sounds like a good first step to deduce whats going on there. If we can rule out locking at least we can investigate down another route.

          Tom FENNELLY added a comment -

          Tom FENNELLY added a comment - PR: https://github.com/jenkinsci/blueocean-plugin/pull/512

          Code changed in jenkins
          User: Tom Fennelly
          Path:
          src/main/java/org/jenkinsci/plugins/ssegateway/Endpoint.java
          src/main/java/org/jenkinsci/plugins/ssegateway/EventHistoryStore.java
          src/main/java/org/jenkinsci/plugins/ssegateway/SubscriptionConfigQueue.java
          src/main/java/org/jenkinsci/plugins/ssegateway/sse/EventDispatcher.java
          src/test/java/org/jenkinsci/plugins/ssegateway/EndpointUnitTest.java
          http://jenkins-ci.org/commit/sse-gateway-plugin/4c2e42882f6ff87f9250022b7c0c8949d1b1fb60
          Log:
          JENKINS-38252 Async subs configuration (#11)

          • Removing synchronization around subscription configuration

          Make it async

          • Removed unneeded synchronization around channel subs counters
          • Capture authentication when the dispatcher is created

          Doing it async results in it being done outside the context of a user request, resulting in every subscription being created for ANONYMOUS and therefore many events not being delivered because of permissions restrictions.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Tom Fennelly Path: src/main/java/org/jenkinsci/plugins/ssegateway/Endpoint.java src/main/java/org/jenkinsci/plugins/ssegateway/EventHistoryStore.java src/main/java/org/jenkinsci/plugins/ssegateway/SubscriptionConfigQueue.java src/main/java/org/jenkinsci/plugins/ssegateway/sse/EventDispatcher.java src/test/java/org/jenkinsci/plugins/ssegateway/EndpointUnitTest.java http://jenkins-ci.org/commit/sse-gateway-plugin/4c2e42882f6ff87f9250022b7c0c8949d1b1fb60 Log: JENKINS-38252 Async subs configuration (#11) Removing synchronization around subscription configuration Make it async Removed unneeded synchronization around channel subs counters Capture authentication when the dispatcher is created Doing it async results in it being done outside the context of a user request, resulting in every subscription being created for ANONYMOUS and therefore many events not being delivered because of permissions restrictions.

            tfennelly Tom FENNELLY
            vivek Vivek Pandey
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: