-
Notifications
You must be signed in to change notification settings - Fork 159
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
Performance is slow for large installations #272
Comments
I suggest: I am very interested in contributing my pr with your permission. |
You are very welcome to fork the repo and open a pull-request. |
Thanks for your reply, I think it's feature development,Need a lot of PR to solve this issue,Would you help me to create a branch named feature/issue-272 in this repository? |
Only contributions from forks are allowed. If you want to make a lot of changes it might be better if you keep your feature in your fork without merging to this main repo. To avoid causing problems for the 30k+ installations that are using it. |
I see,ok,I will develop this issue on my forks repo. |
I pushed an alternative solution here. Adding a loading cache to |
Thanks for your commit, But Adding a loading cache to |
If you use I made an alternative with the cache config on the global config page. I think that might be better so that users don't need to change their webhook url:s. #275 |
I released |
I'm sorry, You didn't get me, I won't use token in my job, the specise job will invoke "Jenkins.getInstance().get().getItemByFullName(fullName, ParameterizedJobMixIn.ParameterizedJob.class);" |
So a solution might be to start using a token and enable the cache? You can use the exact same token i all 10000 jobs. |
no, I think it is good idea to use my idea that use the specise job, and Using the cache layer will cause waste of memory resources, data inconsistency, etc. |
my idea is use the specise job, and more detail:
|
How much memory does the cache allocate in your case? |
When I reviewed your code again, I found that our solution may be different. You use the cache to store all the List ParameterizedJob, and then filter out the qualified ParameterizedJob according to the token. The time complexity of this is o(n); My solution is to use the path to find the corresponding job, and the time complexity is o(1); this is not mutually exclusive, it can completely coexist. |
If one job needs 128 bytes, I do not se a problem with "waste of memory resources". By "data inconsistency" you probably mean that any changes to the configuration will be delayed by the cache. I dont see a problem with that as the configurations are (in my experience) rarely changed. As I stated in your first PR: As I see it a PR is really just a way of asking for free maintenance. There is nothing stopping you from adjusting the code to your needs and use that in you Jenkins. But for me to maintain it, it has to be as simple as possible. If a complex feature only helps a few users I would rather not merge it. So I dont want another solution here, the caching is the solution until I see some convincing motivation to why it is not. |
Yeah, You are right, But when I used the cache job finder for performance comparison in my development, I found that the cache finder had no effect on reducing the interface time-consuming time. I felt that the cache layer had no effect. i don't know why. The test scenario: jenkins version [Jenkins 2.361.4] and set Cache Get Jobs Minutes is 5. |
Hello,
We have more than 10000+ jobs in jenkins, The git trigger the job by using generic-webhook-trigger-plugin that will spend 2+ minutes. When I parse the code, I found that the time is consumed in the following code:
I'm wondering if it's possible to get the corresponding job based on the content of the request,I tried to modify the code for testing, using a job with a specified path to trigger, and found that the efficiency increased significantly,So,The JobFinder that Find the corresponding job according to the request content to trigger the task by request body is required.
The text was updated successfully, but these errors were encountered: