Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • otb otb
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 204
    • Issues 204
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 11
    • Merge requests 11
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Main Repositories
  • otbotb
  • Merge requests
  • !934

Draft: PERF: Optimize SarSensorModel & GeocentricTranform

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Luc Hermitte requested to merge lhermitte/otb:OptiTransformation into develop Sep 22, 2022
  • Overview 0
  • Commits 8
  • Pipelines 2
  • Changes 10

Summary

Improvement of the performances of:

  • SarSensorModel::projToSurface()
    • SarSensorModel::ApplyCoordinateConversion
    • SarSensorModel::interpolateSensorPosVel
    • Ratio(Duration, Duration)
    • EcefToWorld()

Rationale

In continuation on !933, and the profiling of https://gitlab.orfeo-toolbox.org/s1-tiling/normlim_sigma0 XYZToImage application, the aforementioned functions had a perceptible performance impact.

Implementation Details

EcefToWorld(): Compute final atan2 on best candidate only

EcefToWorld() was computing atan2() on every possible solution. This function is quite costly. In the end (on small test), it was more time consuming than accessing DEM data (XYZToImage application)

SarSensorModel::ApplyCoordinateConversion: Remove unnecessary allocations

SarSensorModel::ApplyCoordinateConversion was systematically copying or filling a new vector every time it was called. These dynamic allocations are not necessary. Polynomials are now evaluated on the fly without storing intermediary coefficients.

SarSensorModel::interpolateSensorPosVel Don't accumulate on out parameters

It's better to compute accumulations into local (array) variables. Otherwise the compiler cannot assume the current function is the last one to have changed the current value.

Also avoids pow(sqrt(v), 2)

Inline functions from otbDateTime

Ratio() and NumberOfTicks() are extremely short functions that are called a lot. They benefit from inlining.

Copyright

The copyright owner is CNES and has signed the ORFEO ToolBox Contributor License Agreement.


Check before merging:

  • All discussions are resolved
  • At least 2 👍 votes from core developers, no 👎 vote.
  • The feature branch is (reasonably) up-to-date with the base branch
  • Dashboard is green
  • Copyright owner has signed the ORFEO ToolBox Contributor License Agreement
  • Optionally, run git diff develop... -U0 --no-color | clang-format-diff.py -p1 -i on latest changes and commit
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: OptiTransformation