You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "easyice (via GitHub)" <gi...@apache.org> on 2023/12/16 17:38:59 UTC
[PR] Use growNoCopy in some places [lucene]
easyice opened a new pull request, #12951:
URL: https://github.com/apache/lucene/pull/12951
Found some `grow` method can be change to `growNoCopy` when reading code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Use growNoCopy in some places [lucene]
Posted by "epotyom (via GitHub)" <gi...@apache.org>.
epotyom commented on code in PR #12951:
URL: https://github.com/apache/lucene/pull/12951#discussion_r1457735063
##########
lucene/core/src/java/org/apache/lucene/util/fst/Util.java:
##########
Review Comment:
I think `toUTF16` is another method in this class that can use `growNoCopy`. But it would require implementing it for `IntsRefBuilder`. Which can lead to using it in a few other places where we call `IntsRefBuilder#grow` now?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Use growNoCopy in some places [lucene]
Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss merged PR #12951:
URL: https://github.com/apache/lucene/pull/12951
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Use growNoCopy in some places [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on code in PR #12951:
URL: https://github.com/apache/lucene/pull/12951#discussion_r1428978833
##########
lucene/core/src/java/org/apache/lucene/util/BytesRefBuilder.java:
##########
@@ -60,6 +60,13 @@ public void grow(int capacity) {
ref.bytes = ArrayUtil.grow(ref.bytes, capacity);
}
+ /**
+ * Used to grow the builder without coping bytes. see {@link ArrayUtil#growNoCopy(byte[], int)}.
Review Comment:
Thank you @dweiss , sorry for the typo!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Use growNoCopy in some places [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on PR #12951:
URL: https://github.com/apache/lucene/pull/12951#issuecomment-1900247470
Thank you for reviewing!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Use growNoCopy in some places [lucene]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12951:
URL: https://github.com/apache/lucene/pull/12951#issuecomment-1924928770
This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the dev@lucene.apache.org list. Thank you for your contribution!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Use growNoCopy in some places [lucene]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12951:
URL: https://github.com/apache/lucene/pull/12951#issuecomment-1880898535
This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the dev@lucene.apache.org list. Thank you for your contribution!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Use growNoCopy in some places [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on code in PR #12951:
URL: https://github.com/apache/lucene/pull/12951#discussion_r1458564693
##########
lucene/core/src/java/org/apache/lucene/util/fst/Util.java:
##########
Review Comment:
Nice find! Thank you @epotyom !
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Use growNoCopy in some places [lucene]
Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss commented on code in PR #12951:
URL: https://github.com/apache/lucene/pull/12951#discussion_r1428895426
##########
lucene/core/src/java/org/apache/lucene/util/BytesRefBuilder.java:
##########
@@ -60,6 +60,13 @@ public void grow(int capacity) {
ref.bytes = ArrayUtil.grow(ref.bytes, capacity);
}
+ /**
+ * Used to grow the builder without coping bytes. see {@link ArrayUtil#growNoCopy(byte[], int)}.
Review Comment:
```suggestion
* Used to grow the builder without copying bytes. see {@link ArrayUtil#growNoCopy(byte[], int)}.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Use growNoCopy in some places [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on PR #12951:
URL: https://github.com/apache/lucene/pull/12951#issuecomment-1925637932
@epotyom @dweiss Hi, can you help me to merge if it looks okay?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Use growNoCopy in some places [lucene]
Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss commented on PR #12951:
URL: https://github.com/apache/lucene/pull/12951#issuecomment-1925823962
I've backported to branch_9x as well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org