sionna icon indicating copy to clipboard operation
sionna copied to clipboard

Significant Increase in Scene Loading Time from Sionna 0.16.2 to 0.18

Open kjellwagn opened this issue 1 year ago • 5 comments

I have noticed a significant increase in the amount of time it takes to load a scene from a '.xml' file exported from Blender using Mitsuba after upgrading from Sionna version v0.16.2 to v0.18. The same '.xml' file that took 5 seconds to load now takes around 8 minutes in the new version. Also, the RAM usage exceeds 40 GB, which seems unusually high.

Tested versions: Sionna 0.16.2 | tensorflow 2.15.0 | python 3.9.19 Sionna 0.18 | tensorflow 2.15.0 | python 3.9.19

Ubuntu 22.04.4

Is this increase in loading time and memory usage a known issue? Could it be related to the new intelligent surfaces introduced in the latest version?

kjellwagn avatar Aug 14 '24 09:08 kjellwagn

Hi @kjellwagn, Does this behavior only occur when loading your custom scene, or do you also experience it with the built-in scenes?

Is your custom scene particularly large or does it contain a very detailed mesh?

SebastianCa avatar Aug 19 '24 09:08 SebastianCa

Hey @SebastianCa ,

This also occurs with the built-in scenes, although the time increase is minimal. For example, the Munich scene takes an average of 5 seconds to load in v0.16.2 and 7.5 seconds in v0.18. In fact, the custom scene being used is quite large and detailed, comprising about 5.5 million triangles.

kjellwagn avatar Aug 19 '24 13:08 kjellwagn

That sounds like a fairly large scene. We’ll look into it and get back to you.

SebastianCa avatar Aug 20 '24 09:08 SebastianCa

Hello @kjellwagn,

We have identified some performance regressions, and fixes will be included in the next release. Thanks for bringing it to our attention!

In terms of memory usage, I didn't measure a particular difference on the built-in Munich scene. Could you please share the scene where you've measured increased usage? Please include all meshes and the XML file.

merlinND avatar Aug 22 '24 08:08 merlinND

I appreciate your support. Due to company restrictions, I can't share the entire scene, so I have attached a cutout. However, one can still notice the performance penalty regarding loading time and memory usage. cutout.zip

kjellwagn avatar Aug 26 '24 14:08 kjellwagn

Thanks for sharing the scene.

I have done the following measurements with nvtop for memory usage & runtime: measurements

They all reach the same memory usage, mostly due to TensorFlow allocating a large memory arena from the start. How did you measurement memory usage?

On the CPU I have checked and the upcoming version seems to use roughly as much memory as v0.16.2, so hopefully the loading time fix also significantly decreased memory usage.

merlinND avatar Sep 09 '24 09:09 merlinND

Fixed in release 0.19.

jhoydis avatar Oct 02 '24 10:10 jhoydis