All tests should be start at the same time using more concurrent threads · Issue #2076 · 2dust/v2rayNG · GitHub |
您所在的位置:网站首页 › v2rayngithub › All tests should be start at the same time using more concurrent threads · Issue #2076 · 2dust/v2rayNG · GitHub |
When running a batch test for all list, the tests get done sequentially and each 10 tests wait for the earlier tests to be done. It's slow when the list is too long. It is because number 10 is hard-coded as the number of threads in V2RayTestService class This number should be configurable or it should be a larger number. Tests are IO burst tasks which don't use much CPU so increasing this number won't cause a huge CPU slowdown or performance issues. Increasing this number, only causes the tests not getting waited or locked in a queue so they all can start at the same time. This number should be the highest supported integer range, or if there's any risk for crashing the app, it should be at least 1000. Later we can make it configurable too. Also, a cachedThreadPool is the alternative solution. |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |