Comments (5)
Good idea. I am currently trying to do that using a dart (not flutter) vm. The valgrind outputs are not that good currently, but I will show you the results when I figure it out.
from allo-isolate.
What we currently do is emulating the DartVM in rust, just emulating the behavior that we got by reading the sdk/vm
codebase.
But for actual testing on real Dart, it is hard for now, what you can do is running a simple flutter app with no UI and run it on a real device on profile
mode.
Then you have an observability URL that you can open in the browser and keep an eye on the memory usage.
In the app code, you can pass messages between Rust and Dart with a big payload (say 512kb or 1M) and start observing the memory usage getting high and low or if it keeps growing indefinitely.
Also, it would be cool to do the same experiment with the new ZeroCopyBuffer
to see the difference.
Would be super helpful to publish the result/screenshots of the memory graph here too.
from allo-isolate.
Hi, I have added:
- Dart + Valgrind test
- Flutter on iOS, Flutter on Android test
See: the "test" CI workflow in https://github.com/fzyzcjy/flutter_rust_bridge
Seems that allo-isolate does not have memory problems. Yeah!
from allo-isolate.
That's good to know, Thanks!
from allo-isolate.
You are welcome!
from allo-isolate.
Related Issues (18)
- Custom types from library result in: `Cell<bool>` cannot be shared between threads safely HOT 2
- Directly find out Dart_PostCObject function pointer, instead of manually letting Dart to call Rust's store_dart_post_cobject? HOT 2
- Publish a new version? HOT 4
- Support `Float32List`? (Can make a PR) HOT 5
- Streaming data HOT 3
- Passing structs through an isolate.post() HOT 2
- Sanitizer errors HOT 6
- Support Vec<Box<XXX>>
- Implicit zero copy on `Vec<u8>` HOT 9
- The official website, Sunshine.foundation, says that domain is being sold... HOT 3
- when zero-copy is enabled, shall we mark `ZeroCopyBuffer` as deprecated, and provide a NonZeroCopyBuffer HOT 6
- Is memory copy involved when sending `Uint8List` from Dart to Rust? HOT 2
- bug: DartCObject does not handle cases except Int8/Uint8, making memory leak HOT 2
- Is there any way to run a Rust function on Dart VM shutdown? HOT 2
- bug: Cannot use allo-isolate in two libraries with static linking because of symbol name duplication HOT 4
- bug: Memory leak using Dart_PostCObject because need to consider the return value is true or false HOT 4
- bug: critical DOUBLE-FREE problem for all calls to post() HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from allo-isolate.