[ 
https://issues.apache.org/jira/browse/AMQ-6158?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Christopher L. Shannon updated AMQ-6158:
----------------------------------------
    Description: 
AMQ-5923 added a new feature to compute the pending message size for a durable 
subscription.  The problem is that the current algorithm used in KahaDB to 
iterate over the pending messages for a subscription runs in O(n^2) because it 
uses the wrong index (location index) to compute the size.

Now that AMQ-6097 has been resolved so that the order index contains size 
information for messages as well, we can rewrite the algorithm to be O\(n) 
which will make this run significantly faster for large pending message sizes 
(such as 100k messages, etc)

  was:
AMQ-5923 added a new feature to compute the pending message size for a durable 
subscription.  The problem is that the current algorithm used in KahaDB to 
iterate over the pending messages for a subscription runs in O(n^2) because it 
uses the wrong index (location index) to compute the size.

Now that AMQ-6097 has been resolved so that the order index contains size 
information for messages as well, we can rewrite the algorithm to be O(n) which 
will make this run significantly faster for large pending message sizes (such 
as 100k messages, etc)


> Computing message size for a durable subscription is very slow
> --------------------------------------------------------------
>
>                 Key: AMQ-6158
>                 URL: https://issues.apache.org/jira/browse/AMQ-6158
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker, KahaDB
>    Affects Versions: 5.13.0
>            Reporter: Christopher L. Shannon
>            Assignee: Christopher L. Shannon
>
> AMQ-5923 added a new feature to compute the pending message size for a 
> durable subscription.  The problem is that the current algorithm used in 
> KahaDB to iterate over the pending messages for a subscription runs in O(n^2) 
> because it uses the wrong index (location index) to compute the size.
> Now that AMQ-6097 has been resolved so that the order index contains size 
> information for messages as well, we can rewrite the algorithm to be O\(n) 
> which will make this run significantly faster for large pending message sizes 
> (such as 100k messages, etc)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to