You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "maedhroz (via GitHub)" <gi...@apache.org> on 2023/06/28 16:33:06 UTC

[GitHub] [cassandra] maedhroz commented on a diff in pull request #2451: CASSANDRA-18494 Upgrade lucene-core library to the latest stable version

maedhroz commented on code in PR #2451:
URL: https://github.com/apache/cassandra/pull/2451#discussion_r1245483964


##########
src/java/org/apache/cassandra/index/sai/disk/io/IndexInputReader.java:
##########
@@ -72,36 +75,6 @@ public void readBytes(byte[] bytes, int off, int len) throws IOException
         input.readFully(bytes, off, len);
     }
 
-    /**
-     * Using {@link RandomAccessReader#readShort()} directly is faster than {@link DataInput#readShort()} which calls
-     * {@link DataInput#readByte()} one by one
-     */
-    @Override
-    public short readShort() throws IOException
-    {
-        return input.readShort();
-    }
-
-    /**
-     * Using {@link RandomAccessReader#readInt()} directly is faster than {@link DataInput#readInt()} which
-     * calls {@link DataInput#readByte()} one by one
-     */
-    @Override
-    public int readInt() throws IOException
-    {
-        return input.readInt();
-    }
-
-    /**
-     * Using {@link RandomAccessReader#readLong()} directly is faster than {@link DataInput#readLong()} which
-     * calls {@link DataInput#readByte()} one by one
-     */
-    @Override
-    public long readLong() throws IOException
-    {
-        return input.readLong();
-    }
-

Review Comment:
   Are these optimizations no longer necessary? it seems like `DataInput` still reads byte-by-byte...
   
   Do we just never use these methods?
   
   CC @mike-tr-adamson 



-- 
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: pr-unsubscribe@cassandra.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org