Skip to content

Conversation

@AlexJerabek
Copy link
Collaborator

This article has samples that show the benefits of avoiding context.sync calls in a loop. This PR adds the sample for the correlated objects pattern (and the less performant variant).

Open to feedback on the folder/playlist placement. as well as other notes on the sample code itself.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 5 changed files in this pull request and generated no comments.

Files not reviewed (2)
  • view-prod/word.json: Language not supported
  • view/word.json: Language not supported
Comments suppressed due to low confidence (2)

samples/word/90-scenarios/correlated-objects-pattern.yaml:112

  • [nitpick] The function name 'tryCatch' is too generic. It should be renamed to 'executeWithErrorHandling' to make its purpose clearer.
async function tryCatch(callback) {

playlists/word.yaml:559

  • Replace backticks around context.sync with single quotes to ensure compatibility with all YAML parsers.
description: Shows the performance benefits of avoiding `context.sync` calls in a loop.

Copy link
Contributor

@ElizabethSamuel-MSFT ElizabethSamuel-MSFT 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. Are you planning to link to this sample from the article, maybe in the "See also" section or areas where the fast/slow patterns are discussed?

@AlexJerabek
Copy link
Collaborator Author

Looks good. Are you planning to link to this sample from the article, maybe in the "See also" section or areas where the fast/slow patterns are discussed?

Yes! I will add text that encourages readers to follow along with in Script Lab. Just wanted the links first.

@AlexJerabek AlexJerabek merged commit a034dfc into main Jan 31, 2025
1 check passed
@AlexJerabek AlexJerabek deleted the AlexJ-CorObjects branch January 31, 2025 17:27
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.

4 participants