Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0F1AE18DB7 for ; Wed, 16 Sep 2015 16:55:02 +0000 (UTC) Received: (qmail 40286 invoked by uid 500); 16 Sep 2015 16:54:46 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 40171 invoked by uid 500); 16 Sep 2015 16:54:46 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 39999 invoked by uid 99); 16 Sep 2015 16:54:45 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Sep 2015 16:54:45 +0000 Date: Wed, 16 Sep 2015 16:54:45 +0000 (UTC) From: "Benedict (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-10322) skipBytes is used extensively, but is slow MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-10322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14790725#comment-14790725 ] Benedict commented on CASSANDRA-10322: -------------------------------------- I booboo'd. I meant we do want to throw EOF, but that's regrettably _not_ compatible with {{skipBytes}} as defined by {{DataInput}} (which says clearly that it won't). We could change that, of course, but it's a possible razor to cut ourselves on later (even if very unlikely) > skipBytes is used extensively, but is slow > ------------------------------------------ > > Key: CASSANDRA-10322 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10322 > Project: Cassandra > Issue Type: Improvement > Components: Core > Reporter: Benedict > Assignee: Benedict > Priority: Trivial > Fix For: 3.0.x > > > We skip a great deal to avoid materializing data. Ironically, however, skipping is just as (perhaps more) expensive, as it allocates a temporary array of the size of the number of bytes we want to skip. > This trivial patch implements {{skipBytes}} more efficiently, and simplifies {{FileUtils.skipBytesFully}} -- This message was sent by Atlassian JIRA (v6.3.4#6332)