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

Ignite TC Bot commented on IGNITE-12508:
----------------------------------------

{panel:title=Branch: [pull/8802/head] Base: [master] : No blockers 
found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}{panel}
{panel:title=Branch: [pull/8802/head] Base: [master] : No new tests 
found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#F7D6C1}{panel}
[TeamCity *--> Run :: All* 
Results|https://ci.ignite.apache.org/viewLog.html?buildId=5880670&buildTypeId=IgniteTests24Java8_RunAll]

> GridCacheProcessor#cacheDescriptor(int) has O(N) complexity
> -----------------------------------------------------------
>
>                 Key: IGNITE-12508
>                 URL: https://issues.apache.org/jira/browse/IGNITE-12508
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Ivan Rakov
>            Assignee: Atri Sharma
>            Priority: Major
>              Labels: newbie
>          Time Spent: 3h 50m
>  Remaining Estimate: 0h
>
> See the method code:
> {code}
>     @Nullable public DynamicCacheDescriptor cacheDescriptor(int cacheId) {
>         for (DynamicCacheDescriptor cacheDesc : cacheDescriptors().values()) {
>             CacheConfiguration ccfg = cacheDesc.cacheConfiguration();
>             assert ccfg != null : cacheDesc;
>             if (CU.cacheId(ccfg.getName()) == cacheId)
>                 return cacheDesc;
>         }
>         return null;
>     }
> {code}
> This method is invoked in several hot paths which causes significant 
> performance regression when the number of caches is large, for example, 
> logical recovery and security check for indexing.
> The method should be improved to use a hash map or similar data structure to 
> get a better complexity



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to