Skip to content

775 preload specific messages in fla#824

Merged
Kwash67 merged 13 commits into
mainfrom
775-preload-specific-messages-in-fla
Nov 5, 2025
Merged

775 preload specific messages in fla#824
Kwash67 merged 13 commits into
mainfrom
775-preload-specific-messages-in-fla

Conversation

@Kwash67

@Kwash67 Kwash67 commented Nov 5, 2025

Copy link
Copy Markdown
Contributor

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.

Copilot AI review requested due to automatic review settings November 5, 2025 00:47
@Kwash67 Kwash67 linked an issue Nov 5, 2025 that may be closed by this pull request
@Kwash67 Kwash67 requested a review from a team November 5, 2025 00:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread gcs/src/fla.jsx Outdated
Comment thread gcs/src/fla.jsx Outdated
Comment thread gcs/electron/fla.js
Comment thread gcs/src/fla.jsx Outdated
Kwash67 and others added 5 commits November 5, 2025 00:51
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>
Comment thread gcs/src/fla.jsx
@1Blademaster

Copy link
Copy Markdown
Member

Also what happens when you try and preload labels which aren't available? I imagine they just get ignored right?

@Kwash67

Kwash67 commented Nov 5, 2025

Copy link
Copy Markdown
Contributor Author

Also what happens when you try and preload labels which aren't available? I imagine they just get ignored right?

Yes, they get ignored. See below lines 487 to 502 of fla.js, within the getMessage function.
Screenshot 2025-11-05 at 12 15 11

@Kwash67 Kwash67 merged commit d42846e into main Nov 5, 2025
6 checks passed
@Kwash67 Kwash67 deleted the 775-preload-specific-messages-in-fla branch November 5, 2025 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Preload specific messages in FLA

3 participants