eProsima / Fast-DDS-Gen

Fast-DDS IDL code generator tool. Looking for commercial support? Contact info@eprosima.com
Apache License 2.0
77 stars 58 forks source link

fastddsgen is terribly slow. #173

Closed persan closed 1 year ago

persan commented 1 year ago

Is there an already existing issue for this?

Expected behavior

fastddsgen very-simple-simple.idl shall take less than 0.02 sek to complete on a modern machine. I benchmarked fastddsgen aganist the two following "codegenerators" for IDL-files iac from AdaCore:s polyorb 0.01 sec idlc from cyclonedds 0.01 sec and fastddsgen takes approx 75 times longer to complete the trivial task. My current analysis is that fastddsgen is a Java application while the other two are "compiled".

I have tried other "Java" idl-2-lang generators as well and they are in partition with fastddsgen in speed.

Current behavior

It take to long time to do code generation.

Steps to reproduce

Untar and make: with the codegenerators idlc (from cyclonedds) and fastddsgen in path. report.tar.gz

Fast DDS version/commit

https://github.com/eProsima/Fast-DDS-Gen.git: 43db23d16d5a45a3df91fb6f11959e3c705e8d3f from 90755661+jsantiago-eProsima@users.noreply.github.com 2023-03-02 09:35:28

Platform/Architecture

Other. Please specify in Additional context section.

Transport layer

Default configuration, UDPv4 & SHM

Additional context

I am runing: OpenJDK Runtime Environment (Red_Hat-17.0.6.0.10-1.fc37) for fastddsgen and gcc version 11.3.1 to build iac and idlc

XML configuration file

No response

Relevant log output

No response

Network traffic capture

No response

JLBuenoLopez commented 1 year ago

Hi @persan

Thanks for your contribution. As you are stating, Fast DDS-Gen is a Java application for generating the related Type Support required for Fast DDS from provided IDL files. It is well-known that from a performance point of view, Java is slower than C/C++ due to code reinterpretation at runtime in the case of Java applications. Consequently, I am labeling this issue as invalid, because it is implying that Fast DDS-Gen should be migrated to a more performative programming language, which, in itself, would be a completely new tool.

Also, Fast DDS-Gen is only required to generate the code once every time the IDL file is modified, so it is not usually being run constantly. Can you share more about your use case and why are you concerned about Fast DDS-Gen performance?