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

Calling function script takes 1.5 seconds #291

Open
jrheisey opened this issue May 3, 2023 · 1 comment
Open

Calling function script takes 1.5 seconds #291

jrheisey opened this issue May 3, 2023 · 1 comment

Comments

@jrheisey
Copy link

jrheisey commented May 3, 2023

Setup

  • File test.m contains function test()
    • Function take one float parameter
    • returns one hardcoded float parameter
  • Python code calls octave.test(value) using oct2py.

Observation

  • I am observing an execution times of 1.5 seconds
  • The first call is 2.0 seconds as expected per Octave documentation

Things I've tried which were unsuccessful

  • Adding mlock (); to the function script
  • Using get_pointer() and calling with the pointer

Why does it take so long to call a simple function?
Could something be misconfigured?

A response in the Octave forum said he could duplicate this behavior on Windows and Linux.
It appears to be a limitation in Oct2Py.

@jrheisey
Copy link
Author

jrheisey commented May 3, 2023

I have worked around this issue by spawning the 'octave' command line tool and parsing stdout. This takes just 125 milliseconds.

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

No branches or pull requests

1 participant