Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Archicad): Receive slowed down in Archicad 26 #3154

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

jozseflkiss
Copy link
Contributor

@jozseflkiss jozseflkiss commented Jan 30, 2024

Description & motivation

https://spockle.atlassian.net/browse/CNX-8760

Changes:

It seems that Archciad 26 has a bug. When e.g. passing %lf to GS::String::SPrintf, it does not iterate on all the format specifier options available for both double and float, just takes the first one, which in this case is %f. After that it compares the sizes: %f --> float (4 bytes), the passed argument was double (8 bytes). This size mismatch creates a log entry in the log file which takes so much time per vertex of a mesh being imported.
In Archicad 27 this seems to be solved.
Since the string representation of the vertex written into GDL was not and should not be so precise (enough to have 8 digits), the fix is to cast the parameters to float-s.

Checklist:

  • My pull request follows the guidelines in the Contributing guide?
  • My pull request does not duplicate any other open Pull Requests for the same update/change?
  • My commits are related to the pull request and do not amend unrelated code or documentation.
  • My code follows a similar style to existing code.
  • I have added appropriate tests.
  • I have updated or added relevant documentation.

@jozseflkiss
Copy link
Contributor Author

@AlanRynne Bulk of the changes are formatting, and be able to build the add-on with debug version of Archicad.

Copy link
Member

@AlanRynne AlanRynne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll trust you on the c++ side... we'll give it a good test

@AlanRynne AlanRynne merged commit 8d0bc93 into dev Jan 31, 2024
32 checks passed
@AlanRynne AlanRynne deleted the archicad/CNX-8760-Receive-slow-down branch January 31, 2024 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants