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

Robbie Gemmell commented on ARTEMIS-3173:
-----------------------------------------

Looking at the existing impl behaviour, I think you would need to limit such an 
optimisation to only applying in the non-filtered (i.e. null filter object) 
case.

Right now the method filters the messages locally during iteration 
[\[1\]|https://github.com/apache/activemq-artemis/blob/8635eb65eb8612d89e84dcb87b7a9b7b529fbcc7/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/QueueControlImpl.java#L1581],
 before considering them part of the results it is trying to index into. As 
such you cant skip into the iterator at the beginning unless you already know 
the results of the filtering wont change the set of messages to index, which 
you can only really do when there isnt a filter.

[1] 
https://github.com/apache/activemq-artemis/blob/8635eb65eb8612d89e84dcb87b7a9b7b529fbcc7/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/QueueControlImpl.java#L1581

> 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