[ 
https://issues.apache.org/jira/browse/ARTEMIS-3173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17443706#comment-17443706
 ] 

Gary Tully commented on ARTEMIS-3173:
-------------------------------------

no, the existing method/API at 
https://github.com/apache/activemq-artemis/blob/main/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/QueueControlImpl.java#L1560
  is fine.

the problem is the implementation, it always walks the entire iterator. 

If you write a test that browses by page using that api and ensure that the 
address is paging. You will find that there is a linear increase relationship 
in the response time as you get to the last page, because on each request we 
iterate through the entire list. 
Ideally the fetch time should be relatively constant. If we can have an 
iterator (new internal api) that jumps/starts to the right page file on disk 
(when the address is paging there will be multiple 'pages' in multiple files) 
it should be better.

it may not be trivial to implement, but it could be fun and interesting.
But the first thing is to write the test to show there really is a problem.

note: There is a pagefile cache, that will disguise the problem, so that may 
need to be reduced via configuration or you may need to have multiple addresses 
such that the page cache is thrashing.


> Queue control browse message in paged mode should not start from the 
> beginning each time
> ----------------------------------------------------------------------------------------
>
>                 Key: ARTEMIS-3173
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3173
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>          Components: JMX
>    Affects Versions: 2.17.0
>            Reporter: Gary Tully
>            Priority: Minor
>
> The implementation of the paged browser creates a browser iterator and 
> searches from the start for each page contents. It wold be better if it was 
> possible to jump right in. Especially when messages are not in memory, ie: 
> address limit has caused paging.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to