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

fix: append servers logs when watching #338

Conversation

jog1t
Copy link
Contributor

@jog1t jog1t commented Sep 21, 2024

Closes HUB-497

TL;DR

Enhanced server logs query options with structural sharing for improved performance.

What changed?

  • Added rivetSerialization import from "@rivet-gg/api/serialization"
  • Implemented structuralSharing function in serverLogsQueryOptions
  • The new function parses old and new data, combining timestamps and lines if both are valid

How to test?

  1. Navigate to the server logs section in the application
  2. Observe the logs loading and updating
  3. Verify that new log entries are appended correctly without duplicates
  4. Check for any performance improvements in log rendering, especially with large datasets

Why make this change?

This change optimizes the handling of server logs by implementing structural sharing. It ensures that new log data is efficiently merged with existing data, reducing unnecessary re-renders and improving overall performance when dealing with large volumes of log entries. This enhancement is particularly beneficial for long-running servers or during intensive debugging sessions.

Copy link

cloudflare-workers-and-pages bot commented Sep 21, 2024

Deploying hub with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1e8185e
Status: ✅  Deploy successful!
Preview URL: https://397ef57e.hub-3av.pages.dev
Branch Preview URL: https://09-21-fix-append-servers-log.hub-3av.pages.dev

View logs

Copy link

graphite-app bot commented Sep 21, 2024

Your org requires the Graphite merge queue for merging into main

Add the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

Copy link

linear bot commented Sep 21, 2024

@jog1t jog1t mentioned this pull request Sep 25, 2024
@jog1t jog1t force-pushed the 09-21-fix_change_servers_page_wording branch from 06fab23 to aefc822 Compare September 25, 2024 22:26
@jog1t jog1t force-pushed the 09-21-fix_append_servers_logs_when_watching branch from 794f7e9 to 1e8185e Compare September 25, 2024 22:26
Copy link

graphite-app bot commented Sep 26, 2024

Merge activity

  • Sep 26, 2:41 AM EDT: jog1t added this pull request to the Graphite merge queue.
  • Sep 26, 2:43 AM EDT: CI is running for this PR on a draft PR: #366
  • Sep 26, 2:45 AM EDT: jog1t merged this pull request with the Graphite merge queue via draft PR: #366.

jog1t added a commit that referenced this pull request Sep 26, 2024
Closes HUB-497

### TL;DR

Enhanced server logs query options with structural sharing for improved performance.

### What changed?

- Added `rivetSerialization` import from "@rivet-gg/api/serialization"
- Implemented `structuralSharing` function in `serverLogsQueryOptions`
- The new function parses old and new data, combining timestamps and lines if both are valid

### How to test?

1. Navigate to the server logs section in the application
2. Observe the logs loading and updating
3. Verify that new log entries are appended correctly without duplicates
4. Check for any performance improvements in log rendering, especially with large datasets

### Why make this change?

This change optimizes the handling of server logs by implementing structural sharing. It ensures that new log data is efficiently merged with existing data, reducing unnecessary re-renders and improving overall performance when dealing with large volumes of log entries. This enhancement is particularly beneficial for long-running servers or during intensive debugging sessions.
@graphite-app graphite-app bot closed this Sep 26, 2024
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.

2 participants