Oscar Franco Profile Banner
Oscar Franco Profile
Oscar Franco

@ospfranco

Followers
2,301
Following
192
Media
215
Statuses
1,474

Freelance Systems Engineer. React Native | Rust Magic.

Munich
Joined February 2017
Don't wanna be here? Send us removal request.
Explore trending content on Musk Viewer
@ospfranco
Oscar Franco
7 months
The new encryption package for React Native is ready. ✅ Re-built it using C++ JSI bindings ✅ Improved error handling ✅ Updated Android natives ✅ Supports hardware encryption ✅ Supports Biometrics Give it a star! 😄
5
12
178
@ospfranco
Oscar Franco
8 months
Got it working. Go make some noise :)
Tweet media one
13
13
171
@ospfranco
Oscar Franco
7 months
You can update to .72.7 and you will get correct stack frames on unhandled promise rejections! 🎉🎉🎉🎉🎉
Tweet media one
7
8
136
@ospfranco
Oscar Franco
7 months
Imagine not having to deal with Cocoapods, Fastlane, Ruby, Gradle and actually having auto-complete, type-checking, and almost immediate errors when you are configuring your app This is what a TypeScript build system could do
7
6
86
@ospfranco
Oscar Franco
7 months
The final numbers are in OP SQLite is not only 3x faster, it also consumes orders of magnitude less memory The fastest SQLite module for React Native is born :)
Tweet media one
4
4
82
@ospfranco
Oscar Franco
7 months
I'm going to re-write as a normal JSI module I will also use Swift 5.9 so I can use Swift functions directly from C++. Will be useful for other modules that want to migrate to 5.9
2
2
72
@ospfranco
Oscar Franco
6 months
0.73 automatically installs pods! nice!
Tweet media one
3
3
72
@ospfranco
Oscar Franco
7 months
OP-SQLite is a success It is 5x faster in iOS and 8x faster on Android as quick-sqlite It uses 5x less memory It supports DB encryption (via OP-SQLCipher) All memory crashes from quick-sqlite are solved Leave it a star and please consider sponsoring
4
2
68
@ospfranco
Oscar Franco
6 months
I just noticed that since 0.73 Hermes is only 16 mbs, wireless run (via Wi-Fi) to iPhone now only takes some seconds to transfer App bundle + Hermes On <0.72 it took even minutes because it seemed to copy the debug symbols This is really awesome
1
0
64
@ospfranco
Oscar Franco
7 months
Happy I got all these working There are a few things I would like to tackle still: Bluetooth, a more advanced sqlite-mobx library, some sort of stand-alone module library that allows for easy C++/Swift/Kotlin mods Nothing will work without sponsoring though
Tweet media one
Tweet media two
Tweet media three
4
6
64
@ospfranco
Oscar Franco
8 months
Are you tired of getting garbage stack traces on unhandled promise rejections? me too! I want to tackle this problem at the Hermes/RN level. Give me a hand upvoting this and if you have some info, feel free to dump it here @tmikov
Tweet media one
1
4
63
@ospfranco
Oscar Franco
5 months
0.73.2 is out. There is even more error stack goodness for you (in case you are still missing error stacks on the yellow box).
Tweet media one
1
3
59
@ospfranco
Oscar Franco
7 months
Hacking quick-sqlite again ✅Queries are anywhere between 2x to 3x faster ✅Memory consumption is 50% to 80% smaller ✅It is now possible to run huge queries that before might have run out of memory Here are a 300k records being loaded into memory
Tweet media one
Tweet media two
Tweet media three
Tweet media four
5
0
56
@ospfranco
Oscar Franco
7 months
JSI/Expo/JS final results. Function calls vs object property access
Tweet media one
2
3
53
@ospfranco
Oscar Franco
8 months
If you want to prevent the annoying metro message about recrawling when it starts. You can add this to your .watchmanconfig (for now, might get fixed upstream)
Tweet media one
2
2
53
@ospfranco
Oscar Franco
7 months
Once you understand shared pointers the world is your oyster ✅Memory consumption is halved ✅ Property access is a bit faster ~15ms iOS ~25ms Android Queries are a tiny bit slower but for half the memory 🤝 A deal I'm willing to take
Tweet media one
2
1
49
@ospfranco
Oscar Franco
7 months
Just shaved ~50ms by switching from std::any to std::variant Leaning C++ is fun :)
Tweet media one
0
0
46
@ospfranco
Oscar Franco
7 months
Tweet media one
4
1
46
@ospfranco
Oscar Franco
3 months
Using a Mac Studio for building an app 🏎️
Tweet media one
6
0
44
@ospfranco
Oscar Franco
7 months
I was wondering where Expo makes money, looking at these prices, no need... Curious what is the markup really, has anyone switched from raw Fastlane on GH or CircleCI to EAS and can dm me how much they ended up paying? On GH with several weekly builds, we were at ~1-2k/month
Tweet media one
15
2
43
@ospfranco
Oscar Franco
8 months
I got C++ to call a Swift function! 🚀 The next step is binding a JSI function to a Swift function, I wonder if that will work.
Tweet media one
1
4
43
@ospfranco
Oscar Franco
6 months
For anyone who will update their react-native-macos apps, this is the change set I had to apply to Sol Fairly small
3
2
42
@ospfranco
Oscar Franco
6 months
Just discovered that SQLite supports Memory Mapped I/O and it's crazy. 300k records. Release Mode. Loading changes: iOS: 510 ms → 450 ms (-60ms) Android: 1125 ms → 1002 ms (-123ms) Basically, for free, prepared statements don't even move the needle
Tweet media one
3
2
42
@ospfranco
Oscar Franco
7 months
New OP-SQLite release, fixes some crashes and errors Please consider sponsoring, working on Sundays (as fun as it might be) is not really sustainable :) Also: making Bento boxes is fun, is there any online generator?
Tweet media one
4
1
41
@ospfranco
Oscar Franco
7 months
I just fucked up my elbow bouldering, but here is the last results I got before leaving my house old quick-sqlite: 8292ms expo-sqlite: 4678ms new quick-sqlite: 2840ms 300k rows of strings, ints, doubles
Tweet media one
Tweet media two
Tweet media three
1
0
40
@ospfranco
Oscar Franco
6 months
The best explanation I've seen of an ABI... all the C++ forums and posts are freaking impossible to understand. I wish I had this a couple of years ago.
Tweet media one
1
3
41
@ospfranco
Oscar Franco
5 months
Added bar chart to the JSI benchmark repo. Far easier to get a feeling for the speed of things.
Tweet media one
Tweet media two
4
5
41
@ospfranco
Oscar Franco
7 months
I'm too dumb and I make mistakes, but that's also why I posted the code :) Thanks @jamesedmonston Real performance of HostObject/JSI/ExpoModules... amazingly HostObject implementation is faster than a raw binding to the global context
Tweet media one
3
1
38
@ospfranco
Oscar Franco
5 months
It's nice to look at where things started by just playing around and then methodically replacing bits and bolts getting somewhere magical iOS: 2719ms (quick-sqlite) → 634ms → 390ms Android: 8851 (quick-sqlite) → 2220ms → 754ms 🤯
Tweet media one
Tweet media two
1
0
38
@ospfranco
Oscar Franco
7 months
Taking a look inside Expo Modules code. It's a bunch of nice tricks. You are just creating classes that wrap up the obj-c callbacks and conversions for you. No magic, just Swift-ObjC interop interacting with JSI C++, I wonder if they could simplify it with 5.9
Tweet media one
Tweet media two
Tweet media three
Tweet media four
1
0
36
@ospfranco
Oscar Franco
7 months
iOS/macOS Keychain is nothing but a wrapper against and encrypted SQLite db. Your life is a lie.
5
0
36
@ospfranco
Oscar Franco
3 months
Stumbled upon a way to prevent Android Studio from opening the emulator in the retarded in-app window
Tweet media one
4
1
35
@ospfranco
Oscar Franco
6 months
Memory-mapped I/O + prepared statement SQLite is crazy Here is a single insert/get compared to MMKV SQLite is a powerhouse of a database and still comes within an inch of a key-value storage
Tweet media one
5
2
35
@ospfranco
Oscar Franco
6 months
Finally got some time to finish testing JSI/Expo Modules on Android. Here are both results for comparison Android → Samsung s22 with debug compilation iOS → iPhone 15 Pro with debug compilation
Tweet media one
Tweet media two
2
0
32
@ospfranco
Oscar Franco
7 months
op-sqlite now supports the update hook, get notified whenever a row changes in your database You can now build a fully reactive system based on sqlite
Tweet media one
1
1
33
@ospfranco
Oscar Franco
5 months
Finally got access to my S22 and could measure op-sqlite with the performance flag (and also rn-mmkv) This is (as far as I can see) the end of the line for performance, an equivalent pure C++ program also executes in ~370±10ms Until static hermes is here :)
Tweet media one
1
2
33
@ospfranco
Oscar Franco
7 months
Here is the current progress in converting turbo-secure-storage to a non-turbo-module Speed compared to MMKV is okay, but by using the native APIs you get OS Hardware encryption/decryption and hardening of access You also gain access to features like biometrics
Tweet media one
2
0
32
@ospfranco
Oscar Franco
4 months
Starting a project with Tauri. I see so many of the mistakes RN has already overcome. JSON serialization for native, untested alpha out-of-tree targets, missing docs If companies knew/understood the great strides taken in the last years by RN they would not use anything else
2
1
32
@ospfranco
Oscar Franco
6 months
New version of op-sqlite, it has been converted to a turbo module. No new functionality, just future proofing.
3
0
31
@ospfranco
Oscar Franco
3 months
New docs for OP SQLite, built with Notion.
Tweet media one
1
0
29
@ospfranco
Oscar Franco
7 months
W00p w00p first sponsor :)
Tweet media one
0
1
29
@ospfranco
Oscar Franco
7 months
It doesn't get any sweeter than that Getting close to getting the first function call working, which actually unlocks a bunch of other interesting stuff :)
Tweet media one
1
0
29
@ospfranco
Oscar Franco
7 months
Updated the C++ notes. With for dummies explanations for smart pointers and std::any and std::variant
1
1
25
@ospfranco
Oscar Franco
7 months
If you were using CodePush (or the Expo version) or reloading the JS bundle, quick-sqlite would crash. Just fixed this on OP-SQLite, so you can safely push and restart the JS Bundle
0
1
24
@ospfranco
Oscar Franco
6 months
well... shiet... is there anyway to avoid this?
Tweet media one
9
0
27
@ospfranco
Oscar Franco
7 months
Dear Twitter followers, I'm free to tackle new projects. Especially C++ JSI (or Rust) projects If you or your company need help, feel free to reach out!
2
2
25
@ospfranco
Oscar Franco
7 months
This is cool, you can directly module replace in metro.config.js without the need for babel's "module resolver"
Tweet media one
0
0
25
@ospfranco
Oscar Franco
7 months
Going to release this soon. For now, typing with one hand is veeeeery slow.
Tweet media one
2
0
24
@ospfranco
Oscar Franco
7 months
Here is the first (small part) of implementing webcrypto/subtle on quick-crypto. It unlocks pretty much all the imports/export jobs for all the algos, since the infrastructure is now there It also paves the way for generating/signing/verifying
1
1
24
@ospfranco
Oscar Franco
3 months
Here is a proposal to make reactive queries on a native level
Tweet media one
3
1
23
@ospfranco
Oscar Franco
7 months
If you are using quick-sqlite, there is a major flaw with with TypedArrays (e.g. Uint8Array) and ArrayBuffers, data is not being persisted. Memory handling was botched, on app reload it tried to free non-allocated memory This is all now fixed
1
0
23
@ospfranco
Oscar Franco
8 months
Here is an almost direct JSI binding to Swift, no need to finagle with Obj-C/NS Classes. Unfortunately, I don't think Swift plays well with Obj-C move semantics, but this is far easier than previous versions and probably faster too. More info ↓🧵
Tweet media one
2
1
22
@ospfranco
Oscar Franco
7 months
I've created a new fork of op-sqlite, it uses SQLCipher which is a fork of SQLite that completely encrypts the database with a somewhat minimal overhead). I need help testing it and making sure it is properly encrypted. Try it and let me know
0
2
20
@ospfranco
Oscar Franco
6 months
Now that Flipper is going out the window, it seems there is no way to debug SQLite databases on the device... Does anybody know of any alternative? P.S. Android Studio db explorer doesn't work with op-sqlite because it doesn't use the Java API
Tweet media one
8
0
20
@ospfranco
Oscar Franco
6 months
When executing a SQLite query, most of the work is actually creating a plan on how to retrieve the data You can avoid this cost by preparing the statement once and re-using it multiple times (with different params if necessary) Coming to op-sqlite, does anybody want to sponsor?
Tweet media one
1
0
20
@ospfranco
Oscar Franco
6 months
Added some sections to the README on how to speed up SQLite to its limits, plus other helpful tips
Tweet media one
1
1
20
@ospfranco
Oscar Franco
3 months
App Center has reached EOL I still remember seeing CodePush and being amazed (it is also one of the best-named services ever) RIP
2
0
19
@ospfranco
Oscar Franco
5 months
My backpack got stolen the day after I arrived in Costa Rica. It had my computer, drone and passports inside, police won't do anything because I only have a rough (meters location) I miss latam but when it sucks, it sucks big time
6
0
19
@ospfranco
Oscar Franco
7 months
Added support for in-memory databases. Useful for synchronization only dbs. It's slightly faster than persisting to disk.
0
1
19
@ospfranco
Oscar Franco
6 months
SQLite is amazing
@sarna_dev
Piotr Sarna
6 months
SQLite takes multitenancy to the next level. Just tested @tursodatabase 's libsql-server hosting 100k databases, querying them all in a loop. It used 1.6GiB of RAM. I could host a database for everyone in my town on a Raspberry Pi (and still have spare memory for @The_Pi_Hole ).
Tweet media one
Tweet media two
4
54
377
0
0
18
@ospfranco
Oscar Franco
3 months
I just had an idea for making op-sqlite reactive on a native level This would be amazing and paired with mobx (or w/e u use) give you a real-time sqlite state management However, it would be time-consuming as I would need to re-write a large chunk of the library 💰 anyone?
4
0
19
@ospfranco
Oscar Franco
7 months
Another 100ms shaved on iOS, I guess a vector it is
Tweet media one
0
1
18
@ospfranco
Oscar Franco
6 months
I used to clean my disk every half a year, now I'm doing it every month... wtf is going on
Tweet media one
8
0
18
@ospfranco
Oscar Franco
7 months
TIL you can get the local directory where the simulator emulates the file system simply by typing `po NSHomeDirectory` in the Xcode console when debugging/paused
Tweet media one
2
1
18
@ospfranco
Oscar Franco
7 months
In the mood for benchmarking stuff Here is OP-S2 compared to SQLCipher and MMKV Wanted to try expo-secure-store but the installation of expo kaputs itself with Yarn3, it should be on par with op-s2 expect a bit slower due to Expo Modules
Tweet media one
4
0
18
@ospfranco
Oscar Franco
3 months
New OP SQLite release A lot of people have struggled with trying to open an existing database. I've added a new function to move one from assets into the file system easily It also fixes a compilation issue with sqlcipher
Tweet media one
2
1
17
@ospfranco
Oscar Franco
6 months
I just updated op-sqlite example app to RN 0.73 and everything went fine, actually more than fine, if you have any issues let me know Moving to Kotlin is **actually** really great, sorry for the confusion Painless migration :)
0
0
17
@ospfranco
Oscar Franco
6 months
Read many years ago > The only way to make code faster (besides a faster processor) is to make the computer execute less code
1
1
17
@ospfranco
Oscar Franco
4 months
If you are interesting in the complications of bridgeless you can follow the discussion of migrating op-sqlite here Many thanks to the core RN team Again this is a time consuming process, donate to further support
1
0
17
@ospfranco
Oscar Franco
7 months
Final question I had, access time on objects Unless I'm being too dumb with NativeState (seems only useful to be kept on the native side, no JS shenanigans)
Tweet media one
7
0
17
@ospfranco
Oscar Franco
7 months
Android got a lot faster, almost a whole second. But access property is super slow :(
Tweet media one
0
0
16
@ospfranco
Oscar Franco
7 months
To the Android devs, if your library depends on OpenSSL it will generate , but if another library also depends on it, both will generate it and build will fail Is there any way to exclude only if libcrypto has already been imported
Tweet media one
2
0
16
@ospfranco
Oscar Franco
3 months
The only thing I miss about Flipper: SQLite database explorer Not possible with Xcode/iOS Android Studio only works when using the Java API Was thinking of building something but it seems overly ambitious as a single contributor I guess for now the best is an export function
4
0
16
@ospfranco
Oscar Franco
1 year
@matthew_d_green This stuff is so clever it blows my mind every time
1
0
15
@ospfranco
Oscar Franco
8 months
Collected some repeated code in every project I work on. It will grow with time, for now it's some basic stuff. Think lodash/underscore for everything else that pop-ups during normal app development.
1
1
16
@ospfranco
Oscar Franco
7 months
I'm ending a project this week and now looking for extra projects. If you need a freelancer reach out send me a DM.
0
1
15
@ospfranco
Oscar Franco
7 months
Switching to a vector makes Android almost as fast as iOS wow Access time is still crap but wow
Tweet media one
0
0
15
@ospfranco
Oscar Franco
4 months
Setting up a github self hosted runner is amazing. One script and bam.
2
0
15
@ospfranco
Oscar Franco
7 months
OP-SQLCipher is now fully working and encrypting the DB! Thanks to for helping getting iOS to run
1
0
15
@ospfranco
Oscar Franco
6 months
TIL auto blah = Blah() auto shared_blah = std::make_shared<Blah>(blah) != auto shared_blah = std::make_shared<Blah>(); shiet 🥲 There is a new op-sqlite release. It comes with prepared statements and memory leak fixes
1
0
15
@ospfranco
Oscar Franco
3 months
@twnsndco it is a hosted runner. basically my own hardware connected to the github actions backend
0
0
14
@ospfranco
Oscar Franco
8 months
@kadikraman You can use skia to render them instead of the component translation layer
2
0
14
@ospfranco
Oscar Franco
6 months
I'm trying to benchmark @expo sqlite/next and it's crashing when I try to insert data... I don't quite get the error Anybody is using it?
Tweet media one
1
0
14