Archicad C++ API
About Archicad add-on development using the C++ API.

How to Optimize Performance for Handling Large Data with Archicad's C++ API

nishida_jp
Booster

When handling large amounts of data with Archicad's C++ API, the processing time is too long. What techniques can be used to process data more quickly?

For example, is multitasking possible? Please share any effective methods.

1 REPLY 1

It's possible to run concurrent processes in an add-on, but with significant restrictions. My general advice is:

  • Never call any API functions from any thread apart from the one the add-on is invoked on, i.e. don't use the API functionality concurrently. I can't rule out some functions being safe (only GS could advise on that) but assume they are not thread-safe
  • Don't try to run a process independent of invocation from Archicad, i.e. don't have something continuously as a child process of Archicad but running independently.

Some possible uses might include data-crunching once the requisite data has been obtained from the API - you could break the data into chunks and fire off multiple threads to process the chunks in parallel. But this would be started by a call from Archicad into the add-on, and this call should not return until all the threads are finished.

 

Take this as general advice rather than a completely definitive answer - GS might be able to provide some exceptions. But I expect this will generally set you on the right path.

Ralph Wessel BArch
Central Innovation

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!