Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation #60

Merged
merged 6 commits into from
Oct 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
++
littleGnAl committed Oct 22, 2024
commit 92b8f225693c10712af5399f669668d7ea369eaa
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ An APM library for detecting UI jank in Flutter for mobile (Android/iOS).

Building smooth APPs with Flutter is easy, but as your APP grows in complexity and faces a variety of user environments and devices, ensuring smooth performance in production can be challenging. Even if your app runs smoothly locally, it doesn't guarantee the same for all users. `glance` helps collect stack traces during UI jank, allowing you to pinpoint the exact function causing the performance issue, so you can resolve it effectively.

`glance` detects UI jank during the rendering as well as through various callbacks, such as, `WidgetBindingObserver` callbacks, touch events, and method channel callbacks. These cover most cases that cause UI jank. It works only in release or profile builds when your application is built with the [`--split-debug-info` option](https://docs.flutter.dev/deployment/obfuscate#obfuscate-your-app).
`glance` detects UI jank during the rendering phase as well as through various callbacks, such as, `WidgetBindingObserver` callbacks, touch events, and method channel callbacks. These cover most cases that cause UI jank. It works only in release or profile builds when your application is built with the [`--split-debug-info` option](https://docs.flutter.dev/deployment/obfuscate#obfuscate-your-app).

## Getting Started

4 changes: 2 additions & 2 deletions lib/src/glance.dart
Original file line number Diff line number Diff line change
@@ -94,8 +94,8 @@ class GlanceConfiguration {
/// Refer to [Sampler] for more details.
///
/// To detect UI jank, `glance` extends [WidgetsFlutterBinding] and monitors execution time between [WidgetsFlutterBinding.handleBeginFrame]
/// and [WidgetsFlutterBinding.handleDrawFrame]. It also tracks various callbacks such as `WidgetBindingObserver`, touch events,
/// and method channel callbacks' invocations, checking each against its execution time.
/// and [WidgetsFlutterBinding.handleDrawFrame] during the rendering phase. It also tracks various callbacks such as `WidgetBindingObserver`,
/// touch events, and method channel callbacks' invocations, checking each against its execution time.
/// Jank is detected when the execution time exceeds the [GlanceConfiguration.jankThreshold].
///
/// Upon detecting jank, `glance` fetches stack traces from the [Sampler] during the jank period and reconstructs them into Dart stack traces.