apache / lucene

Apache Lucene open-source search software
https://lucene.apache.org/
Apache License 2.0
2.61k stars 1.02k forks source link

Fix container inefficiencies in FieldInfos.java #13254

Closed cinsttool closed 6 months ago

cinsttool commented 6 months ago

Description

Hi,

We find that there exist container inefficiencies in FieldInfos.java.

At line 169, there maybe a redundant operation that Arrays.asList(valuesTemp.toArray(new FieldInfo[0])) transform List object valuesTemp to array and then back to List.

We discovered the above containers inefficiencies by our tool cinst. The patch is submitted. Could you please check and accept it? We have tested the patch on our PC. The patched program works well.

mikemccand commented 6 months ago

We discovered the above containers inefficiencies by our tool cinst.

Could you share a pointer to this tool? I'm curious how it works... thanks.

cinsttool commented 6 months ago

We discovered the above containers inefficiencies by our tool cinst.

Could you share a pointer to this tool? I'm curious how it works... thanks.

Thank you for your interest in cinst! Our tool has not been released yet. Once cinst is open-sourced, we will inform you at first.