michaelandrepearce commented on a change in pull request #2730: ARTEMIS-2399 
Fix performance degradation when there are a lot of subscribers
URL: https://github.com/apache/activemq-artemis/pull/2730#discussion_r297880945
 
 

 ##########
 File path: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageCursorProviderImpl.java
 ##########
 @@ -209,7 +235,16 @@ private PageCache readPage(long pageId,
          }
          page.open();
          final long startedReadPage = System.nanoTime();
-         List<PagedMessage> pgdMessages = page.read(storageManager);
+         List<PagedMessage> pgdMessages;
+         if (indexCache == null) {
+            pgdMessages = page.read(storageManager);
+         } else {
+            TreeMap<Integer, Integer> messageNumberToOffset = new TreeMap<>();
 
 Review comment:
   Or even could this be simply an array of int, where array size will be max 
messageid - min messageid, and then simply access the offset by int[messageid - 
min messageid]

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to