Skip to content

Conversation

@SebastianKrupinski
Copy link
Contributor

@SebastianKrupinski SebastianKrupinski commented Dec 1, 2025

  • Resolves: # Client Ticket

Summary

  • Refactored subscription sync to address memory exhaustion issue

Issue

  • Calendar subscription was building the entire calendar import file several times. Building an ics file in memory of around 8/10k of events exhausts all memory.
  • Calendar subscription was loading all existing calendar object in to memory to compare etags

Solution

  • Don't build the entire calendar in memory, use the import stream reader to read one event at a time.
  • Don't load all existing events with data when all we need is the etag

Checklist

@ChristophWurst

This comment was marked as resolved.

@SebastianKrupinski

This comment was marked as resolved.

@SebastianKrupinski SebastianKrupinski force-pushed the fix/calendar-subscription-memory-exhaustion branch from c9e6225 to 85873ff Compare December 2, 2025 14:27
@SebastianKrupinski SebastianKrupinski requested a review from a team as a code owner December 2, 2025 14:27
@SebastianKrupinski SebastianKrupinski requested review from Altahrim, leftybournes, salmart-dev and yemkareems and removed request for a team December 2, 2025 14:27
@SebastianKrupinski
Copy link
Contributor Author

@tcitworld @ChristophWurst

We good with the rest of the code?

Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

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

Looks good

3rdparty change is probably unrelated

@SebastianKrupinski
Copy link
Contributor Author

Looks good

3rdparty change is probably unrelated

Correct the 3rdparty is not related, I'll remove it

@SebastianKrupinski SebastianKrupinski force-pushed the fix/calendar-subscription-memory-exhaustion branch from fee7767 to 92488ea Compare December 3, 2025 16:32
Copy link
Member

@tcitworld tcitworld left a comment

Choose a reason for hiding this comment

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

Did not test, but code looks good

@SebastianKrupinski SebastianKrupinski force-pushed the fix/calendar-subscription-memory-exhaustion branch from 409a023 to 1a0535a Compare December 9, 2025 17:36
@SebastianKrupinski SebastianKrupinski merged commit 75edec9 into master Dec 9, 2025
205 of 209 checks passed
@SebastianKrupinski SebastianKrupinski deleted the fix/calendar-subscription-memory-exhaustion branch December 9, 2025 18:08
@github-project-automation github-project-automation bot moved this from 🏗️ In progress to ☑️ Done in 💌 📅 👥 Groupware team Dec 9, 2025
@SebastianKrupinski
Copy link
Contributor Author

Yay, now for the back port fun

@SebastianKrupinski
Copy link
Contributor Author

/backport to stable32

@SebastianKrupinski
Copy link
Contributor Author

/backport to stable31

@backportbot
Copy link

backportbot bot commented Dec 9, 2025

The backport to stable31 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable31
git pull origin stable31

# Create the new backport branch
git checkout -b backport/56784/stable31

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 1a0535aa

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/56784/stable31

Error: Failed to check for changes with origin/stable31: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: ☑️ Done

Development

Successfully merging this pull request may close these issues.

4 participants