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

✨ / πŸ› Cache Fetch Component List #293

Merged
merged 2 commits into from
Feb 15, 2024

Conversation

MFA-X-AI
Copy link
Member

Description

On larger workflow canvas with a very large component library collection, the call to fetchNodeByName is a very expensive operation as it performs a server call to refresh and fetch the latest node information. This function is used in reloading nodes, or creating literals from component library nodes.

This PR caches the component list and only triggers it at the beginning or when the component tray refresh button is pressed.

Pull Request Type

  • Xircuits Core (Jupyterlab Related changes)
  • Xircuits Canvas (Custom RD Related changes)
  • Xircuits Component Library
  • Xircuits Project Template
  • Testing Automation
  • Documentation
  • Others (Please Specify)

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Tests

1. Test Component Library Cache

1. Open the console on Xircuits launch. Confirm that it logs that Xircuits is fetching the component library, and it completes.
2. Perform reload node, or create a literal from a component library. Confirm from the network tab that it does not fetch from the server.
3. Press the refresh button from the tray. Confirm that it performs the fetch.

Tested on?

  • Windows
  • Linux Ubuntu
  • Centos
  • Mac
  • Others (State here -> xxx )

Sorry, something went wrong.

Copy link

Binder πŸ‘ˆ Launch a binder notebook on branch XpressAI/xircuits/fahreza/cache-fetch-component

@MFA-X-AI MFA-X-AI requested a review from treo February 15, 2024 12:40
@MFA-X-AI MFA-X-AI merged commit e35cd3b into master Feb 15, 2024
@MFA-X-AI MFA-X-AI deleted the fahreza/cache-fetch-component branch February 23, 2024 04:56
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.

None yet

2 participants