This repository has been archived by the owner. It is now read-only.

Speed up NativeImageLoader a bit on Android by avoiding direct NIO buffers #507

Merged
merged 1 commit into from Feb 9, 2018

Conversation

Projects
None yet
1 participant
@saudet
Copy link
Member

saudet commented Feb 9, 2018

Fixes deeplearning4j/deeplearning4j#4411

What changes were proposed in this pull request?

Reading from direct NIO buffers on Android is slow, so avoid them when copying image data.

How was this patch tested?

Unit tests pass. Checked manually performance on Android emulator with 640x480 RGB image:
new NativeImageLoader(480, 640, 3).asMatrix(File) took ~85 ms before, now it takes ~60 ms.

@saudet saudet merged commit 9a104e7 into master Feb 9, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

DrChainsaw added a commit to DrChainsaw/DataVec that referenced this pull request Feb 15, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.