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

Ivan Bessonov updated IGNITE-27355:
-----------------------------------
    Description: 
* When you add metrics for partitions within the table (for example) you copy 
the entire array {{N}} times ({{{}N{}}} - number of local partitions). This is 
{{O(N*M)}} ({{{}M{}}} - current number of metrics, which is at least {{O(N)}} 
itself).
 * When you delete the table, you do the same thing (and it uses 
{{{}java.util.Collection#removeIf{}}})

We should use a concurrent hash map instead.

  was:
* When you add metrics for partitions within the table (for example) you copy 
the entire array {{{{N}}}} times ({{{}{{N}}{}}} - number of local partitions). 
This is {{{{O(N*M)}}}} ({{{}{{M}}{}}} - current number of metrics, which is at 
least {{{{O(N)}}}} itself).
 * When you delete the table, you do the same thing (and it uses 
{{{}java.util.Collection#removeIf{}}})

We should use a concurrent hash map instead.


> OTLP MetricReporter is inefficient
> ----------------------------------
>
>                 Key: IGNITE-27355
>                 URL: https://issues.apache.org/jira/browse/IGNITE-27355
>             Project: Ignite
>          Issue Type: Improvement
>          Components: metrics framework ai3
>            Reporter: Ivan Bessonov
>            Priority: Major
>              Labels: ignite-3
>
> * When you add metrics for partitions within the table (for example) you copy 
> the entire array {{N}} times ({{{}N{}}} - number of local partitions). This 
> is {{O(N*M)}} ({{{}M{}}} - current number of metrics, which is at least 
> {{O(N)}} itself).
>  * When you delete the table, you do the same thing (and it uses 
> {{{}java.util.Collection#removeIf{}}})
> We should use a concurrent hash map instead.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to