a free (libre) open source, mobile OS for Ethereum https://status.app
Go to file
Icaro Motta c1d2d44da4
perf: Fix app freeze after login (#20729)
We do a few things to reduce the initial load and make the app more responsive
after login. The scenario we are covering is a user who joined communities with
a large number of members and/or which contain token-gated channels with many
members.

- Related to https://github.com/status-im/status-mobile/issues/20283
- Related to https://github.com/status-im/status-mobile/issues/20285

- Optimize how we convert a community from JS to CLJS. Community members and
  chat members are no longer transformed to CLJS, they are kept as JS. Read more
  details below.
- Delay processing lower-priority events by creating a third login phase. The
  goal is to not put on the same queue we process communities less important
  events, like fetching the count of unread notifications. Around 15 events
  could be delayed without causing trouble (and this further prevent a big chain
  of more events to be dispatched right after login).
- Tried to use re-frame's flush-dom metadata, but removed due to uncertainty,
  check out the discussion:
  https://github.com/status-im/status-mobile/pull/20729#discussion_r1683047969
  Use re-frame’s support for the flush-dom metadata whenever a signal arrives.
  According to the official documentation, this should tell re-frame to only
  process the event after the UI has been updated. It’s hard to say if this
  makes any difference, but the theory is sound.
- Reduce the amount of data returned to the subscription that renders a list of
  communities. We were returning too much, like all members, chats, token
  permissions, etc.

Other things I fixed or improved along the way:

- Because members are now stored as JS, I took the opportunity to fix how
  members are sorted when they are listed.
- Removed a few unused subs.
- Configured oops to not throw during development (in production the behavior is
  to never throw). This means oops is now safe to be used instead of interop
  that can mysteriously fail in advanced compilation.
- Show compressed key instead of public key in member list for the account
  currently logged in.

Technical details

The number one reason affecting the freeze after login was coming from
converting thousands of members inside communities and also because we were
doing it in an inefficient way using clojure.walk/stringify-keys. We shouldn't
also transform that much data on the client as the parent issue created by
flexsurfer correctly recommends. Ever since PR
https://github.com/status-im/status-mobile/pull/20414 was merged, status-go
doesn't return members in open channels, which greatly helps, for example, to
load the Status community. The problem still exists for communities with
token-gated channels with many members.

The current code in develop does something quite inefficient: it fetches the
communities, then transforms them recursively with js->clj and keywordizes keys,
then transforms again all the potentially thousands of member IDs back to
strings. This PR changes this. We now shallowly convert a community and ignore
members because they can grow too fast. From artificial benchmarks simulating
many members in token-gated channels, or communities with thousands of members,
the improvement is noticeable.

You will only really notice improvements if you have spectated or joined a
community with 1000+ members and/or a community with many token-gated channels,
each containing perhaps hundreds of members.

What's the ideal solution?

We should consider removing community members and channel members from the
community entity returned by status-go entirely. The members should be a
separate resource and paginated so that the client doesn't need to worry
about the number of members, for the most part.
2024-07-25 21:23:08 -03:00
.clj-kondo chore(tests): New match-strict? cljs.test directive (#20825) 2024-07-24 23:06:41 -03:00
.dependabot [Fixes: #11518] Fix dependabot directory 2020-12-07 12:14:16 +01:00
.github .github: add default prio label for bug (#20557) 2024-06-25 17:35:08 +02:00
.lsp chore: add lsp clean-ns in lint-fix (#17661) 2023-10-18 00:17:43 +08:00
.vscode Document how to auto-format Clojure files in VSCode with zprint (#17719) 2023-10-25 23:19:56 -03:00
android Any link to status.app opens in status even if it's not supported (#20427) 2024-06-11 11:59:55 +02:00
ci e2e: separated tests to run in PRs 2024-07-15 12:46:18 +03:00
doc chore(docs): Document some of our existing testing practices (#20691) 2024-07-23 23:45:14 -03:00
fastlane fix: location of logs generated by fastlane 2024-04-22 10:07:06 +02:00
ios Wallet Connect message signing (#20693) 2024-07-16 14:36:16 +03:00
logs upgrade nixpkgs to 23-11 (#19369) 2024-04-01 16:26:44 +05:30
maestro init: maestro dev automation (#18712) 2024-02-06 23:29:35 +05:30
modules/react-native-status Fix missing avatar and name in members of the community channels and group chats (#20619) 2024-07-12 11:12:49 +05:30
nix chore(tests): New match-strict? cljs.test directive (#20825) 2024-07-24 23:06:41 -03:00
patches bump RNN to 7.39.0 and remove patches (#20109) 2024-05-20 20:21:49 +05:30
resources feat(swap): set spending cap screen (#20727) 2024-07-22 08:50:29 -03:00
scripts Add centralized metrics 2024-07-11 10:06:46 +01:00
src perf: Fix app freeze after login (#20729) 2024-07-25 21:23:08 -03:00
test e2e: updated testnet switching and added one test into smoke 2024-07-25 23:46:13 +03:00
test-resources Update prettier config for the project. (#16303) 2023-06-19 19:09:12 +05:30
translations feat(wallet)_: Add beta info box in activity tab (#20873) 2024-07-25 21:28:30 +05:30
.buckconfig upgrade react-native and packages - but broken 2016-04-24 15:07:08 +07:00
.carve_ignore FINAL BOSS! rename status-im2 to status-im (#18241) 2023-12-19 20:59:07 +01:00
.dockerignore Create Nix package for building status-go 2019-04-09 12:44:39 +02:00
.env set fleet to status.staging 2024-07-15 10:30:01 +01:00
.env.e2e set fleet to status.staging 2024-07-15 10:30:01 +01:00
.env.jenkins set fleet to status.staging 2024-07-15 10:30:01 +01:00
.env.nightly set fleet to status.staging 2024-07-15 10:30:01 +01:00
.env.release set fleet to status.staging 2024-07-15 10:30:01 +01:00
.envrc Add login integration test 2022-06-08 13:43:32 +01:00
.eslintrc.js upgrade react-native to 0.72.5 (#17241) 2023-12-11 21:22:23 +05:30
.flowconfig RN 63 and xcode12 2021-01-14 09:41:38 +01:00
.gitattributes Desktop branch merged into develop (#5266) 2018-07-23 18:21:31 +03:00
.gitignore dx(debug)_: Add FlowStorm, a tracing debugger for Clojure(Script) (#20054) 2024-06-03 19:47:10 -03:00
.mailmap fix my name 2019-02-28 14:50:42 +01:00
.nycrc move status-im under legacy (#18237) 2023-12-19 18:41:30 +01:00
.prettierignore chore(style): Sort JSON keys in translations/en.json (#20785) 2024-07-21 22:39:50 -03:00
.prettierrc.js chore(style): Sort JSON keys in translations/en.json (#20785) 2024-07-21 22:39:50 -03:00
.watchmanconfig Ensure shell.nix uses same nixpkgs as the rest of the environment 2019-06-20 09:18:24 -04:00
.zprintrc chore(tests)_: Facilitate writing event tests (#20424) 2024-06-13 22:03:02 -03:00
LICENSE.md Create LICENSE.md 2016-09-21 10:00:44 +08:00
Makefile chore(tests): Allow test-watch-for-repl target to run while the app is running (#20827) 2024-07-24 00:18:27 -03:00
README.md chore: fix few outdated things in docs & readme (#18920) 2024-02-22 00:17:09 +05:30
RELEASES.md rename quo2 (#17660) 2023-10-17 17:27:18 +02:00
VERSION Bump release to 2.29.0 2024-05-27 12:41:49 +01:00
app.json Lint and fix missing trailing newlines (#16445) 2023-07-04 19:40:13 +00:00
babel.config.js upgrade `react-native` to 0.73.5 (#18563) 2024-03-22 19:51:44 +05:30
binding.gyp Add status-go tests 2022-05-25 17:59:02 +01:00
default.nix nix: minor cleanup and documentation updates 2020-06-05 14:49:34 +02:00
index.js Update prettier config for the project. (#16303) 2023-06-19 19:09:12 +05:30
metro.config.js upgrade react-native to 0.72.5 (#17241) 2023-12-11 21:22:23 +05:30
package.json chore(style): Sort JSON keys in translations/en.json (#20785) 2024-07-21 22:39:50 -03:00
react-native.config.js upgrade react-native to 0.72.5 (#17241) 2023-12-11 21:22:23 +05:30
shadow-cljs.edn chore(tests): New match-strict? cljs.test directive (#20825) 2024-07-24 23:06:41 -03:00
shell.nix nix: minor cleanup and documentation updates 2020-06-05 14:49:34 +02:00
status-go-version.json fix_:still return the image when image server is unable to get public key (#20538) 2024-07-19 17:17:53 +08:00
supervisord.conf Add docker-compose for development build 2018-04-11 14:58:38 +01:00
yarn.lock chore(style): Sort JSON keys in translations/en.json (#20785) 2024-07-21 22:39:50 -03:00

README.md

Status - a Mobile Ethereum Operating System

Get it on Google Play Get it on F-Droid

Get it on Github

Join us in creating a browser, messenger, and gateway to a decentralized world. Status is a free (libre) open source mobile client targeting Android & iOS built entirely on Ethereum technologies. That's right, no middlemen and go-ethereum running directly on your device.

Getting started with Status

Why?

We believe in a medium of pure free trade, economies with fair, permission-less access and a world without intermediaries. We want to create policies that can exist between friends or scale globally, we want to communicate securely and be uninhibited by legacy systems.

We want to take responsibility for our data, and the way we conduct ourselves privately and promote this way of life to a mass audience.

We want deep insights into our own economies so we can make informed, data-driven decisions on how to make our lives better. The Ethereum blockchain, Smart Contracts, Swarm and Whisper provide us with a path forward.

If this interests you, help us make Status a reality - anyone can contribute and we need everyone at any skill level to participate.

How to Contribute?

Go straight to the docs and choose what interests you:

  • Developer Developers are the heart of software and to keep Status beating we need all the help we can get! If you're looking to code in ClojureScript or Golang then Status is the project for you! We use React Native and there is even some Java/Objective-C too! Want to learn more about it? Start by reading our Developer Introduction which guides you through the technology stack and start browsing beginner issues. Then you can read how to Build Status, which talks about managing project dependencies, coding guidelines and testing procedures. Check out our coding guidelines.

  • Community Management Metcalfe's law states that the value of a network is proportional to the square of the number of connected users of the system - without community Status is meaningless. We're looking to create a positive, fun environment to explore new ideas, experiment and grow the Status community. Building a community takes a lot of work but the people you'll meet and the long-lasting relationships you form will be well worth it, check out our Mission and Community Principles

  • Specification / Documentation John Dewey once said, "Education is not preparation for life; education is life itself ". Developers and Designers need guidance and it all starts from documentation and specifications. Our software is only as good as its documentation, check out our docs and see how you can improve what we have.

  • Blog Writing Content is King, keeping our blog up to date and informing the community of news helps keep everyone on the same page.

  • Testers It's bug-hunting season! Status is currently under active development and there is sure to be a bunch of learning, build status from scratch or if an android user checks out our nightly builds. You can shake your phone to submit bug reports, or start browsing our Github Issues. Every bug you find brings Status closer to stable, usable software for everyone to enjoy!

  • Security Status is a visual interface to make permanent changes on the Blockchain, it handles crypto-tokens that have real value and allows 3rd party code execution. Security is paramount to its success. You are given permission to break Status as hard as you can, as long as you share your findings with the community!

  • Evangelism Help us spread the word! Tell a friend right now, in fact, tell everyone - yell from a mountain if you have to, every person counts! If you've got a great story to tell or have some interesting way you've spread the word about Status let us know about it in our chat

Give me Binaries!

You can get our Beta builds for both Android and iOS on our website, through our nightly builds, or by building it yourself.

Core Contributors

Core Team Members

Special thanks to @adrian-tiberius. Without the dedication of these outstanding individuals, Status would not exist.

Contact us

Feel free to email us at support@status.im.

License

Licensed under the Mozilla Public License v2.0