Skip to content

Improve UX for bulk importing PVs#75

Open
ngAlexander9 wants to merge 4 commits intomainfrom
ang/csv-parsing
Open

Improve UX for bulk importing PVs#75
ngAlexander9 wants to merge 4 commits intomainfrom
ang/csv-parsing

Conversation

@ngAlexander9
Copy link
Copy Markdown
Contributor

@ngAlexander9 ngAlexander9 commented Mar 2, 2026

Description

closes #39
This adds async processing and a spinner to indicate that the process is ongoing, and encapsulates the tag validation out of the dialog into its own function. The performance was tested to be about the same when importing consolidated.csv (20-something seconds), but at least the spinner gives the user some indication that something is happening.

image

Through very basic performance checking, it seems like the tag validation is the bottleneck. I tested simple chunking (similar to the chunking done for parsing), but this made performance worse.

Also removes deprecated lines in the husky pre-commit. Not sure why that change wasn't included in #71

Motivation

The bulk import PVs process wasn't providing feedback to the user when processing. For very large files (consolidated.csv in the tens of thousands of rows), this meant the application would appear to hang.

Screenshots

Pre-merge checklist

  • Code works interactively
  • Code follows the style guide
  • Code contains descriptive docstrings
  • New/changed functions and methods are covered in the test suite where possible
  • Test suite passes locally
  • Test suite passes on GitHub Actions

…acking

- Replaced synchronous `parseCSVToPVs` with async `parseCSVToPVsAsync` for better performance with large files
- Added progress tracking with `ParseProgress` type to show parsing and validation status
- Implemented chunked validation processing (50 rows per chunk) to prevent main thread blocking
- Added progress indicators for both parsing and validation phases
- Updated CSVImportDialog to handle async operations with proper state management
- Enhanced error handling and user feedback during import process
…king

Removed the async progress callback and chunked processing from `validateCSVTags` function. The validation now runs synchronously without progress updates, simplifying the implementation while maintaining the same validation logic and results. Updated function signature and removed progress-related code from both the validation function and its caller in CSVImportDialog.
@ngAlexander9 ngAlexander9 self-assigned this Mar 2, 2026
@ngAlexander9 ngAlexander9 requested a review from a team March 2, 2026 20:19
@ngAlexander9 ngAlexander9 marked this pull request as ready for review March 2, 2026 20:50
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.

Import PVs button errors when loading CSV with many PVs

1 participant