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

ASF subversion and git services commented on LUCENE-9424:
---------------------------------------------------------

Commit e4c2be98fa2ffdeacaa1b2566aacd662de067601 in lucene-solr's branch 
refs/heads/master from Michael McCandless
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=e4c2be9 ]

LUCENE-9424: add a performance warning to AttributeSource.captureState javadocs


> Have a warning comment for AttributeSource.captureState
> -------------------------------------------------------
>
>                 Key: LUCENE-9424
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9424
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: general/javadocs
>            Reporter: Haoyu Zhai
>            Priority: Trivial
>         Attachments: LUCENE-9424.patch
>
>
> {{AttributeSource.captureState}} is a powerful method that can be used to 
> store and (later on) restore the current state, but it comes with a cost of 
> copying all attributes in this source and sometimes can be a big cost if 
> called multiple times.
> We could probably add a warning to indicate this cost, as this method is 
> encapsulated quite well and sometimes people who use it won't be aware of the 
> cost.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to