Skip to content

Conversation

@timj
Copy link
Member

@timj timj commented Feb 1, 2022

There can be a large slowdown in PropertySet creation if PropertySet.set() is called without a type being specified. The Configs know the types of their fields so use those types explicitly.

Problematically, the integer type must still be guessed and therefore should either reimplement the guessing code (without the isinstance check because we know it's an int and we know the field doesn't exist) or call ps.set() explicitly -- this defeats the entire purpose of the optimization. Problematically ps.getAsInt() raises when getting a small integer from a long long entry in the container. Rewriting the C++ code to use ps.getAsInt64() could work but is likely not worth it (there are about 15 calls to fix).

@timj timj force-pushed the tickets/DM-33478 branch from a17b8cb to 4202089 Compare February 1, 2022 22:46
@codecov
Copy link

codecov bot commented Feb 1, 2022

Codecov Report

❌ Patch coverage is 2.38095% with 41 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.58%. Comparing base (9cbe204) to head (e72110f).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
python/lsst/pex/config/convert.py 2.70% 36 Missing ⚠️
tests/test_Config.py 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #67      +/-   ##
==========================================
- Coverage   86.47%   85.58%   -0.90%     
==========================================
  Files          46       46              
  Lines        3639     3677      +38     
==========================================
  Hits         3147     3147              
- Misses        492      530      +38     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@timj timj force-pushed the tickets/DM-33478 branch from cdc85f2 to ceedc50 Compare June 16, 2022 23:16
timj added 2 commits October 29, 2025 18:05
There can be a large slowdown in PropertySet creation if
PropertySet.set() is called without a type being specified.
The Configs know the types of their fields so use those
types explicitly.

For integer types always use LongLong.
@timj timj force-pushed the tickets/DM-33478 branch from 4ace2ab to e72110f Compare October 29, 2025 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants