You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "gortiz (via GitHub)" <gi...@apache.org> on 2023/07/07 15:27:05 UTC

[GitHub] [pinot] gortiz opened a new pull request, #11059: Replace Long attributes with primitive values to reduce boxing

gortiz opened a new pull request, #11059:
URL: https://github.com/apache/pinot/pull/11059

   tag: performance
   
   Doing some benchmarking I've found a large number of Long allocations. It seems clear that the main reason is what it looks like an incorrect `Long` usage in `PinotBufferIndexInput._readPointerOffset`, although I also changed `PinotBufferIndexInput._length` and `PinotBufferIndexInput._sliceOffset`.
   
   cc @Jackie-Jiang @xiangfu0 @pradeepgv42 which seem to be the people that actually wrote the class.


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] codecov-commenter commented on pull request #11059: Replace Long attributes with primitive values to reduce boxing

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #11059:
URL: https://github.com/apache/pinot/pull/11059#issuecomment-1625633789

   ## [Codecov](https://app.codecov.io/gh/apache/pinot/pull/11059?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#11059](https://app.codecov.io/gh/apache/pinot/pull/11059?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (32d9b4b) into [master](https://app.codecov.io/gh/apache/pinot/commit/6d99eec9977677cca1493e6ac0ecfd7d20502cdf?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (6d99eec) will **increase** coverage by `0.00%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@            Coverage Diff            @@
   ##           master   #11059     +/-   ##
   =========================================
     Coverage    0.11%    0.11%             
   =========================================
     Files        2200     2146     -54     
     Lines      118802   116299   -2503     
     Branches    17991    17689    -302     
   =========================================
     Hits          137      137             
   + Misses     118645   116142   -2503     
     Partials       20       20             
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | integration1temurin11 | `?` | |
   | integration1temurin17 | `?` | |
   | integration1temurin20 | `?` | |
   | integration2temurin17 | `?` | |
   | integration2temurin20 | `?` | |
   | unittests1temurin11 | `?` | |
   | unittests1temurin17 | `?` | |
   | unittests1temurin20 | `?` | |
   | unittests2temurin11 | `0.11% <ø> (ø)` | |
   | unittests2temurin17 | `0.11% <ø> (ø)` | |
   | unittests2temurin20 | `0.11% <ø> (ø)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://app.codecov.io/gh/apache/pinot/pull/11059?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [...segment/local/utils/fst/PinotBufferIndexInput.java](https://app.codecov.io/gh/apache/pinot/pull/11059?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3Qtc2VnbWVudC1sb2NhbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3Qvc2VnbWVudC9sb2NhbC91dGlscy9mc3QvUGlub3RCdWZmZXJJbmRleElucHV0LmphdmE=) | `0.00% <ø> (ø)` | |
   
   ... and [54 files with indirect coverage changes](https://app.codecov.io/gh/apache/pinot/pull/11059/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] xiangfu0 merged pull request #11059: Replace Long attributes with primitive values to reduce boxing

Posted by "xiangfu0 (via GitHub)" <gi...@apache.org>.
xiangfu0 merged PR #11059:
URL: https://github.com/apache/pinot/pull/11059


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] klsince commented on a diff in pull request #11059: Replace Long attributes with primitive values to reduce boxing

Posted by "klsince (via GitHub)" <gi...@apache.org>.
klsince commented on code in PR #11059:
URL: https://github.com/apache/pinot/pull/11059#discussion_r1256401793


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/fst/PinotBufferIndexInput.java:
##########
@@ -31,11 +31,11 @@
  */
 public class PinotBufferIndexInput extends IndexInput {
   private final PinotDataBuffer _pinotDataBuffer;
-  private final Long _sliceOffset;
-  private final Long _length;
-  private Long _readPointerOffset;
+  private final long _sliceOffset;
+  private final long _length;
+  private long _readPointerOffset;
 
-  public PinotBufferIndexInput(PinotDataBuffer pinotDataBuffer, Long offset, Long length) {
+  public PinotBufferIndexInput(PinotDataBuffer pinotDataBuffer, long offset, long length) {

Review Comment:
   👍 
   
   Looks like this class is only used to read text index. btw, I spotted that at L76 below, `Byte` was used and could be changed to `byte`.



##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/fst/PinotBufferIndexInput.java:
##########
@@ -31,11 +31,11 @@
  */
 public class PinotBufferIndexInput extends IndexInput {
   private final PinotDataBuffer _pinotDataBuffer;
-  private final Long _sliceOffset;
-  private final Long _length;
-  private Long _readPointerOffset;
+  private final long _sliceOffset;
+  private final long _length;
+  private long _readPointerOffset;
 
-  public PinotBufferIndexInput(PinotDataBuffer pinotDataBuffer, Long offset, Long length) {
+  public PinotBufferIndexInput(PinotDataBuffer pinotDataBuffer, long offset, long length) {

Review Comment:
   👍 
   
   Looks like this class is only used to read text index. btw, I spotted that at L76 below, `Byte` was used and could be changed to `byte`.



-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org