Hi all,
So I've been working on a project to pull data from a database and display in on several fields based on the part number picked in each line item.
I got everything running, but it was slow. So I pulled everything down again and I've been adding the fields back in piecemeal and seeing which ones are going slow, and editing the code until I figure out how to reduce it.
Something I've seen happening randomly is that in a set of 10 fields configured exactly the same, I refresh the page in my testing project and one of the fields will read off ~3000ms while the other ones display ~15-20ms.
Has anyone else experienced this? I'm using scriptrunner for the scripted fields, the main part number picker fields are the 'database picker' fields while all the rest are custom scripted fields for other sql queries based on the part number and calculation fields. Just trying to figure out why identical configs are running different
-Jordan
Edit: Additional info, I'm looking at the 'all issues' list, refreshing the page and seeing this happen. If I just click between issues there is no loading delay
@Jordan Hauser Have you tried increasing the number of DB connections? Sounds like you might just be running out of threads.
Sorry I never closed this, I found what I was doing was bad practice. Querying the db 100+ times individually was yielding these odd results I detailed in this post.
Instead of making all of these individual database picker fields and having the configuration script return the proper values for the important field selected, now I just do it all in listeners once the important field has a selection.
Basically when someone picks a part number, there is some additional info I was trying to pull from the database, but multiplied by 10 since there were 10 line items. Now with a listener I just check the part number field, run the queries in as few db connections as possible, then update the fields with the new values and I'm seeing significantly better results.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.