Skip to content

Refactor frontend API calls to use batched metadata and caching#82

Open
pkprathamkhanal wants to merge 10 commits into
ReduxISU:ReduxAPI_GUIfrom
pkprathamkhanal:frontend-api-calls
Open

Refactor frontend API calls to use batched metadata and caching#82
pkprathamkhanal wants to merge 10 commits into
ReduxISU:ReduxAPI_GUIfrom
pkprathamkhanal:frontend-api-calls

Conversation

@pkprathamkhanal
Copy link
Copy Markdown
Contributor

Summary
This PR is the frontend which is fetching to reduce repeated API calls by using the batched request along with caching as well.

Changes Made

  • Replaced per-request API calls with batched endpoints
  • Updated solver, verifier, and visualization
  • Added problemType wherever it is required
  • Introduced caching for the requests that reduces significant amount of time.
  • Removed unnecessary calls.

Why
Previous implementation made repeated API calls for mostly static data. This improves performance and closely matches with backend batching and caching changes.

Notes
Frontend changes are related to backend batching changes.
Backend PR Link: ReduxISU/Redux#168

Update index.js to use batch endpoints, add caching, and fix request handling.
Update Solver.js to use batched solver and info requests
Update Verifier.js to use batched verifier and info requests
Refactor Visualization.js to use batch endpoints for loading visualizations and metadata
Refactor Reducer.js to use batched info endpoint for reduction visualization and improve dependency handling
Refactor Problem.js to load problems and problem metadata from batch API endpoints
Copy link
Copy Markdown

@Trosper3 Trosper3 left a comment

Choose a reason for hiding this comment

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

The speed of the initial loading of the page is MUCH quicker, but none of the problems are loading up.

@pkprathamkhanal
Copy link
Copy Markdown
Contributor Author

You are right, @Trosper3. I am very surprised why this is not working, but I am actively reviewing it. Will come up with solution soon.

Fixed visualization and reduction API requests by including solver parameters in frontend visualization calls.
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 6, 2026

CLA assistant check
All committers have signed the CLA.

Fixed visualization and reduction rendering issues by passing solver parameters into frontend visualization API requests.
Copy link
Copy Markdown
Contributor Author

@pkprathamkhanal pkprathamkhanal left a comment

Choose a reason for hiding this comment

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

This should probably fix the problem.

Copy link
Copy Markdown
Contributor Author

@pkprathamkhanal pkprathamkhanal left a comment

Choose a reason for hiding this comment

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

This has fixed the issue in my local server, and I believe this will load all the components. Thank you.

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.

3 participants