Optimizing Performance and Building a Rich Text Editor for a Chat Platform

Filament is an invite-only platform designed to give users a space to connect and chat, allowing them to network across professional groups.

The client reached out to us with three initial projects in mind: supporting iPad layouts in their mobile app, building a truly native React Native rich text editor, and improving performance on Android. During our collaboration, we managed to speed up app launch time by ~60%, we also worked on the client's web platform and notification system.

Services performed
  • Mobile app development
  • Performance optimization
  • Web development
  • App Clip development
  • Custom library development
  • QA
Tech stack
  • React Native
  • JavaScript
  • Rust
  • React
  • TypeScript
  • Kotlin
  • Swift
  • Objective-C

Challenges & goals

Filament had clear goals for improving their platform across devices and ensuring smooth networking experiences. Together, we aimed to:

  • Reduce Android cold-start time and improve overall app performance
  • Enable consistent, cross-platform experiences on iOS, iPad, Android, and web
  • Build a high-performance, native rich text editor for structured messaging

Supporting iPad layouts in the existing mobile app

We started our collaboration with a goal to extend the client’s existing mobile navigation to tablets – a first step that laid the groundwork for supporting the web. Unlike mobile-only chat apps, Filament’s vision was to let users comfortably switch between conversations, loops, and sidebars on wide screens – similar to a desktop-style split pane layout.

To achieve this, we built a dedicated navigator optimized for wider screens. It supported up to three panels side by side, persisting content on the primary panel when switching tabs. This approach gave users a more fluid, desktop-like experience.

Supporting a split-pane UI required modifying some components to scale across screen sizes, adapting navigation stacks to work with nested navigators, and styling desktop-style panes so they matched the client’s designs. Certain screen-level features, like lightboxes and presentation sheets, also had to be rethought for larger formats. 

From the beginning, we emphasized reusing code across mobile and desktop, which laid the groundwork for consistent cross-platform development.

Cutting Android startup times

When we first began working with Filament, their Android app took from 6 to even 10 seconds to launch cold – a delay long enough to discourage new users before they even sent their first message. So, we set out to analyze and optimize the startup flow. 

Our performance analysis pointed to three major issues: oversized JavaScript bundles, use of libraries that weren’t optimized for native platforms, and slow secure token storage caused by the chosen encryption algorithm. To address these, we:

  • Replaced the encryption algorithm used in secure storage, which had been a hidden bottleneck, but only on certain devices. This allowed us to cut cold-start time on Android from 6-10 s down to ~2 s.
  • Reduced the JavaScript bundle size to shorten parsing and evaluation during startup.
  • Replaced the app’s syntax-highlighting library, which wasn’t optimized for mobile, with a custom React Native wrapper that ensures only a single engine is initialized instead of several competing ones. This further decreased app startup time on test devices from ~2 seconds to just 800–900 milliseconds.

Not only did these activities improve app performance on Android, they also removed a major barrier to adoption, making the Filament app feel instantly responsive and ready to use.

Bringing truly native rich text editing to the React Native community

Messaging apps live or die on their input fields, and Filament’s users needed more than plain text – mentions, styled text, inline formatting, and structured output were all must-haves. The client’s first approach, using an existing tool to provide rich WYSIWYG style text editing, quickly proved limiting. It was slow to mount, introduced inefficient scrolling and keyboard interactions, and made even basic styling difficult, since all CSS and fonts had to be pushed into the WebView.

Together with Filament, we decided to start fresh and build something fully native the client and the entire open source community would benefit from.

This is how react-native-enriched was born. At its heart is EnrichedTextInput, a fully native text input component that brings:

  • High performance thanks to direct interaction with platform components (no unnecessary state or prop overhead)
  • Synchronous text styling, so formatting updates feel instant
  • Live style detection and HTML parsing, making rich content easy to handle
  • Customizable styling, fitting any design system
  • Support for mobile apps using the New Architecture

EnrichedTextInput is uncontrolled, meaning it doesn’t use state or props to store its value. Instead, it communicates directly with underlying platform-specific components, keeping typing buttery smooth while offering advanced features.

By sponsoring this effort, Filament not only refined their product but also contributed greatly to the React Native ecosystem. We hope the library will soon stand as a building block for any React Native team needing structured, styled text input.

Working on the web platform

Filament wanted to bring to life a browser version of the app and focus on truly multiplatform support. By reusing much of the existing mobile platform logic, we were able to deliver the same core experience on the web.

Along the way, we needed to switch the bundler from Webpack to Metro, which unified builds across mobile and web and unlocked smoother cross-platform development. 

We also addressed library compatibility issues, ensuring that dependencies worked reliably in both mobile and browser environments. Finally, we focused on certain platform-specific features that needed tailored implementations: for example, photo uploads rely on native pickers on mobile, but on the web we had to implement a drag-and-drop interface, preserving the same user experience in a way that made sense for each platform.

Thanks to these improvements, Filament achieved a single codebase spanning iOS, Android, iPad, and web, giving users the freedom to stay connected wherever they prefer to chat.

Streamlining onboarding with App Clips

As already mentioned, Filament is an invite-only platform, so joining the app starts with an invitation link. Originally, new users had to manually copy their invite code from an email or web page into the app after downloading, which created a negative first impression.

To simplify this process, we introduced App Clips on iOS and Google Play Referrer parameters on Android. Thanks to these, even first-time users who click an invite link can install or open the app directly from the link, have their invite code automatically pre-filled (eliminating the need for copy-paste) and smoothly move from the invitation to an active conversation.

Ensuring reliable notifications

In a chat app, slow or missing notifications can quickly frustrate users. Filament faced a particular challenge on Android, as incoming messages were encrypted, so they had to be decrypted before they could be displayed. Originally, the app relied on Expo Notifications. 

The problem was that processing each notification on Android – even when the app wasn’t running or was in the background – required launching the full JavaScript runtime, including parts of the code that weren’t needed. On slower devices, this frequently exceeded Android’s 20-second processing limit, which caused notifications to be dropped.

To solve this, we built a fully native notification handler for Android. It processes messages quickly while still handing over interaction logic (such as tapping on a notification) to JavaScript, preserving flexibility without sacrificing speed.

This effort also highlighted another technical need: Filament’s Rust library, which powered message decryption, originally only generated bindings for JavaScript. We refactored it to support both JS and native layers, allowing the native notification handler to decrypt messages efficiently. At the same time, we switched from static to dynamic Rust library linking, reducing the Android app size by roughly 30%.

Results

Our continued collaboration with Filament focuses on concrete technical goals: improving app performance, enabling cross-platform support, and improving the user experience.
In just a few months, we:

  • Cut Android cold-start time from initial 6-10 s to ~800 ms
  • Built a multi-panel navigation system for iPad, macOS, and web
  • Unified bundling logic across mobile and web
  • Reduced Android app size by over 30%
  • Streamlined invite-only onboarding with App Clips and Play Store parameters
  • Delivered reliable, encrypted push notifications
  • Developed React Native Enriched – a fully native rich text editor for React Native

Contact Got a project?
We have the skills to make it happen

Tell us about your project and let's find out
how we can help.