Giter Club home page Giter Club logo

Comments (3)

passsy avatar passsy commented on May 30, 2024

No transformation of the binary stream for more speed is impossible. tl;dr Everything needs to be passed to a different process. Please read this for more infos about Binder and the ContentProvider.

Another thing: Tray isn't fast (and it will never be fast) by design. If you want something fast use the SharedPreferences but you will lose the multiprocess support. That in mind, it is properly not a good idea to store complex data structures in Tray unless it is very important for the data to stay in sync and persisted between different processes. Otherwise it would be a better idea to use a seperate database or a simple file for the data.

There is also a Binder limitation of ~2mb per transaction (visible in logcat as !!! FAILED BINDER TRANSACTION !!!). This means you can't save unlimited data per key.

But I see some cases where persisting a byte[] or a stream could be useful. I hope it does not get abused πŸ˜’.

from tray.

stephanenicolas avatar stephanenicolas commented on May 30, 2024

Thx a lot @pascal Welsch for the details. Though Tray is not what we are
looking for, I wish you good luck with your lib.

2015-07-15 11:02 GMT-07:00 Pascal Welsch [email protected]:

No transformation of the binary stream for more speed is impossible. tl;dr
Everything needs to be passed to a different process. Please read this
#28 (comment)
for more infos about Binder and the ContentProvider.

Another thing: Tray isn't fast (and it will never be fast) by design. If
you want something fast use the SharedPreferences but you will lose the
multiprocess support. That in mind, it is properly not a good idea to store
complex data structures in Tray unless it is very important for the data to
stay in sync and persisted between different processes. Otherwise it would
be a better idea to use a seperate database or a simple file for the data.

There is also a Binder limitation of ~2mb per transaction (visible in
logcat as !!! FAILED BINDER TRANSACTION !!!). This means you can't save
unlimited data per key.

But I see some cases where persisting a byte[] or a stream could be
useful. I hope it does not get abused [image: πŸ˜’].

β€”
Reply to this email directly or view it on GitHub
#33 (comment).

from tray.

ronanhardiman avatar ronanhardiman commented on May 30, 2024

@stephanenicolas What about the library you looking for? Did you find it。Thx

from tray.

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.