cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-10322) skipBytes is used extensively, but is slow
Date Tue, 15 Sep 2015 23:03:46 GMT


Jonathan Ellis commented on CASSANDRA-10322:

* There's no real reason to change FU to require DIP instead of DI
* Eliminating the loop in FU is a bad idea; the DI contract says that skipBytes may skip less
than the requested number of bytes for reasons other than EOF.  (Makes more sense to eliminate
the loop in RBIS and leave skipBytes to the same contract as its parent IS, rather than subtly
changing it.  Even though the DI/IS API is dumb, mixing those into a project where sometimes
we have a "raw" IS doing things the dumb way and sometimes our own where we have changed the
behavior is a good way to introduce bugs.  Better to be up front with recognizing the brain
damage and forcing the caller to always with it, e.g. with the FU wrapper.)

> skipBytes is used extensively, but is slow
> ------------------------------------------
>                 Key: CASSANDRA-10322
>                 URL:
>             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

View raw message