Skip to content

Conversation

@MarkoMin
Copy link
Contributor

  1. Removed call to which_applications and handled the error like it's handled in get_options
  2. Swap to calls to get_options with 1 call to get_options (1 message less per function call)
  3. Handle error if get_options fail

Hope maybe is okay here.

Closes #10282

@github-actions
Copy link
Contributor

github-actions bot commented Oct 20, 2025

CT Test Results

  2 files   23 suites   9m 58s ⏱️
365 tests 359 ✅  6 💤 0 ❌
718 runs  635 ✅ 83 💤 0 ❌

Results for commit 4b6e8b5.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@rickard-green rickard-green added the team:PS Assigned to OTP team PS label Oct 27, 2025
@Whaileee Whaileee added the testing currently being tested, tag is used by OTP internal CI label Nov 3, 2025
@josevalim
Copy link
Contributor

If you want to still check upfront, you can use application:get_key(inets, vsn). It does a direct read from ETS table, so it should not bottleneck on the application controller.

@MarkoMin
Copy link
Contributor Author

MarkoMin commented Nov 6, 2025

If you want to still check upfront, you can use application:get_key(inets, vsn). It does a direct read from ETS table, so it should not bottleneck on the application controller.

You could but:

  1. It's not idiomatic usage of the get_key - I had to look into docs to see why that would work
  2. There is always very small possibility that the process dies between application:get_key/2 call and the actual call which would result in an error.
  3. Other functions do the same so we should either change all of the functions or none.

On the other hand, my solution has try-catch overhead. I choose small performance overhead over possibility to crash where unnecessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team:PS Assigned to OTP team PS testing currently being tested, tag is used by OTP internal CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

httpc:set_options bottlenecked by application:which_applications()

4 participants