Code Monkey home page Code Monkey logo

Comments (4)

markusfisch avatar markusfisch commented on August 17, 2024

Why?

from binaryeye.

KOLANICH avatar KOLANICH commented on August 17, 2024
  1. It seem to be used only for screen rotation.
  2. it carries native libraries, XPrivacy has problems with isolating apps with native libs

from binaryeye.

markusfisch avatar markusfisch commented on August 17, 2024

Yes, RenderScript is used for rotation of the camera frame, but also for downsampling the frame. Both operations don't require RenderScript, of course, but RenderScript is - at least in theory - the fastest way to perform these operations. In practice, performance can vary wildly because RenderScript is an abstraction that is executed either on CPU or GPU depending on what's available on a device. And yes, it's run by native system libraries that also vary very much between vendors and versions.

So it's not an unencumbered choice for sure. At some point, I already made RenderScript optional (in a development build) because I was wrestling to get RenderScript to run on Lineage devices.

Also, RenderScript seems to not get much love from Google itself because building an App Bundle results in a corrupted build. Which is why Binary Eye is stuck with heavy APKs at the moment.

On the other hand, it's still the fastest option for most devices. And I care for speed because the faster the camera image can be processed, the more images can be processed in a given time. And this means barcodes can be recognized faster just simply because there are more images to work with.

What makes things worse is that ZXing isn't exactly fast too. It's full of allocations in the hot path and it often transforms data when it would be faster to just read them with a different algorithm.

So dropping RenderScript would have some benefits but also some serious drawbacks. The only option I see is making it optional for devices where it doesn't run well. What would you think of a switch in the settings for this? Of course, Binary Eye would still include RenderScript libraries in that case.

from binaryeye.

KOLANICH avatar KOLANICH commented on August 17, 2024

RenderScript is an abstraction that is executed either on CPU or GPU depending on what's available on a device.

Thanks for the info. I have assummed that a GPU is always available.

the only option I see is making it optional for devices where it doesn't run well. What would you think of a switch in the settings for this?

This was my fault. I have allowed loading libs but have not allowed exec. After I have allowed exec it runs fine.

from binaryeye.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.