Skip to content

find_package(fastrtps) takes too long #5820

@burak-yildizoz

Description

@burak-yildizoz

Is there an already existing issue for this?

  • I have searched the existing issues

Expected behavior

Variables should be cached after the first call. Consequent calls to find_package should be done in milliseconds.

Current behavior

Each call takes ~1.3 sec to complete.

Steps to reproduce

cmake_minimum_required(VERSION 3.5)
project(test)

foreach(iter RANGE 10)
    message(STATUS "iter: ${iter}")
    find_package(fastcdr REQUIRED)
    find_package(fastrtps REQUIRED)
endforeach()

Configure with the following command:

cmake -G "Ninja" -D CMAKE_BUILD_TYPE=Release .. --profiling-format=google-trace --profiling-output=perfcmake.json
Wall duration First call After then
fastcdr 636 ms ~6 ms
fastrtps 2.84 sec ~1.35 sec

Fast DDS version/commit

v2.14.2

Platform/Architecture

Windows 10 Visual Studio 2019

Transport layer

Default configuration, UDPv4 & SHM

Additional context

No response

XML configuration file

Relevant log output

Network traffic capture

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageIssue pending classification

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions