775 preload specific messages in fla#824
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR optimizes the Flight Log Analyzer (FLA) by implementing data preloading and improving IPC serialization performance. The changes eliminate unnecessary local state management and introduce typed arrays for efficient data transfer between the Electron main process and renderer.
Key changes:
- Implemented preloading of commonly-used message labels on log file load using predefined label sets
- Optimized IPC data transfer by using typed arrays (Float64Array/Float32Array) instead of object arrays
- Refactored to remove local React state (
chartData) in favor of inline computation from memoized values
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| gcs/src/fla.jsx | Removed local state management, added fetchData function for preloading and data unpacking, eliminated redundant useEffect |
| gcs/src/components/fla/constants.js | Added PRELOAD_LABELS constant with predefined message labels for dataflash and fgcs_telemetry log types |
| gcs/electron/main.ts | Updated IPC handler registration to use renamed getMessages function |
| gcs/electron/fla.js | Renamed function from retrieveMessages to getMessages, optimized data structure using typed arrays, added validation for message existence |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1Blademaster
reviewed
Nov 5, 2025
Member
|
Also what happens when you try and preload labels which aren't available? I imagine they just get ignored right? |
Contributor
Author
1Blademaster
approved these changes
Nov 5, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Preloads successfully; Except i'm not using a separate worker. I just use
setTimeout(() => ... , 0). Its simpler.FLA is much faster now. List of messages that are preloaded can be found in src/fla/constants.js
Also, I changed how data is sent to render process. In order to reduce ipc serialization overhead, i send large numeric data as typed arrays, instead of objects. Improved data transfer speed significantly.