You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/05/10 20:40:00 UTC
[jira] [Work logged] (COLLECTIONS-803) CaseInsensitiveMap prevent duplicate key conversion on put
[ https://issues.apache.org/jira/browse/COLLECTIONS-803?focusedWorklogId=768703&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-768703 ]
ASF GitHub Bot logged work on COLLECTIONS-803:
----------------------------------------------
Author: ASF GitHub Bot
Created on: 10/May/22 20:39
Start Date: 10/May/22 20:39
Worklog Time Spent: 10m
Work Description: codecov-commenter commented on PR #276:
URL: https://github.com/apache/commons-collections/pull/276#issuecomment-1122838755
# [Codecov](https://codecov.io/gh/apache/commons-collections/pull/276?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#276](https://codecov.io/gh/apache/commons-collections/pull/276?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3ac374a) into [master](https://codecov.io/gh/apache/commons-collections/commit/1677daceab74895fdf5056c9a48aa94f9e709fb9?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1677dac) will **increase** coverage by `0.01%`.
> The diff coverage is `94.73%`.
```diff
@@ Coverage Diff @@
## master #276 +/- ##
============================================
+ Coverage 85.87% 85.88% +0.01%
- Complexity 4676 4681 +5
============================================
Files 292 292
Lines 13469 13488 +19
Branches 1955 1957 +2
============================================
+ Hits 11566 11584 +18
Misses 1326 1326
- Partials 577 578 +1
```
| [Impacted Files](https://codecov.io/gh/apache/commons-collections/pull/276?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...e/commons/collections4/map/CaseInsensitiveMap.java](https://codecov.io/gh/apache/commons-collections/pull/276/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2NvbW1vbnMvY29sbGVjdGlvbnM0L21hcC9DYXNlSW5zZW5zaXRpdmVNYXAuamF2YQ==) | `92.50% <94.73%> (+2.02%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/commons-collections/pull/276?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/commons-collections/pull/276?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1677dac...3ac374a](https://codecov.io/gh/apache/commons-collections/pull/276?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
Issue Time Tracking
-------------------
Worklog Id: (was: 768703)
Time Spent: 1h 40m (was: 1.5h)
> CaseInsensitiveMap prevent duplicate key conversion on put
> ----------------------------------------------------------
>
> Key: COLLECTIONS-803
> URL: https://issues.apache.org/jira/browse/COLLECTIONS-803
> Project: Commons Collections
> Issue Type: Improvement
> Components: Map
> Affects Versions: 4.4
> Reporter: Simulant
> Priority: Minor
> Labels: performance
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
> When adding a new item into a {{CaseInsensitiveMap}} the {{convertKey(key)}} method is called twice, once in the {{put(key, value)}} method and second in the {{createEntry(next, hashCode, key, value)}} method. The result could be re-used resulting in a better performance.
> Depending on the {{toString()}} implementation of the key and the resulting length of the key before the lower case conversion the operation can get expensive and should not be called twice, as the {{CaseInsensitiveMap}} overwrites the {{convertKey(key)}} method and makes it more expensive and depending on the input unlike in the implementation of the {{AbstractHashedMap}}.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)