Closed
Conversation
kasemir
reviewed
Apr 28, 2025
kasemir
reviewed
Apr 28, 2025
Author
|
Thanks for the comments, previously simulated PVs were not taken into account. Now the following modifications have been made,
|
Collaborator
|
You should not look for a non-null value but use PV.isDisconnected to check the value. |
kasemir
reviewed
Apr 30, 2025
| } else { | ||
| // Handle multiple PV requests using a thread pool for concurrent processing. | ||
| int numberOfThreads = 100; // Set a large number of threads for I/O-bound tasks. | ||
| ExecutorService executorService = Executors.newFixedThreadPool(numberOfThreads); |
Collaborator
There was a problem hiding this comment.
Are you creating a new thread pool for 100 threads each time the servlet is called?!?
Collaborator
|
See also https://github.com/ControlSystemStudio/phoebus/blob/20dd0cce58b3cd9e52dda92ec02affb80dba51b1/core/pv/src/test/java/org/phoebus/pv/ReactivePVTest.java#L57 for example that creates PV, gets single value, releases. That will most efficiently get you the current value, using the value we received last for a known PV. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
At one workshop section hosted by @shroffk at the Spring 2025 EPICS Collaboration Meeting this month, it seemed that a few developers were interested in adding pvget REST API to pvws, and it is the reason why this PR is created.
The implementation of the servlet is as follows,