Conversation
|
Ping @stephendade - any chance you could test this on Windows? |
|
|
Need to set PYTHONPATH. I think it's trying to grab dfindexer from your pip installed pymavlink. |
|
Got the same error message as Peter on Windows. Used I think it's not building the c extensions? Hence not finding the dfindexer module |
WSL + ardupilot environment install script makes it so I can't compile Cython modules without it trying to use visual c as the compile.
This utilizes a barebones Cython module to substantially speed up the time it takes to build the offsets arrays. The C code does the absolute minimum FMT parsing: just the type-length relation. After the arrays are built, they are used to parse FMT, UNIT, MULT, and FMTU very quickly.
Assume modern GPS format and scan for it first with recv_match. If not, fall back to the slower way of parsing every message.
3bb7768 to
e3da9ed
Compare
I had only tested with setup.py. I have fixed it now so that it works correctly through pip install. However, on Windows, I've made it not install the Cython module by default (to avoid having users need to go install Visual C build tools). Set an environment variable |
|
Edit: eh, I got it faster than I expected. |
Previously, we've been parsing every single message after the last instance of the type we're looking for.
This is needed for MAVExplorer's tab-complete to work properly.
skip_to_type adds all these extra messages to the parsed types just in case the user wants to check conditions on those messages. This is a waste in many cases, but especially when recv_match has not been given a conditions argument. We could actually try to parse the conditions for message types, but this is easier for now.
e3da9ed to
a001f48
Compare
|
@robertlong13 really nice work! |
Done, though I made it PYMAVLINK_FAST_INDEX to 0 to disable (instead of PYMAVLINK_DISABLE_FAST_INDEX to 1). |
9af95a9 to
1676b1e
Compare
We use this at install time to determine whether to compile the fast indexer, but we'll also check it at runtime to allow someone to disable it if they encounter issues.
1676b1e to
616191e
Compare
|
I have tested MAVExplorer on Windows too, using the github CI, so I'm ready with a MAVProxy PR as soon as this PR makes its way into PyPI. Only the environment variable portion of the following commit will be needed for the MAVProxy build, the rest is temporary checking out and building pymavlink so I can test. robertlong13/MAVProxy@ffe2cf2 |
|
@robertlong13 great work Bob! |
I frequently work with ~2GB logs, and it's nice to be able to use mavutil to knock together quick analysis scripts, but it can take on the order of 30 seconds just to load the log before I can even start calling
recv_msgorrecv_match.This PR is mainly a rewrite of
init_arraysin Cython for about a 10X speedup of the initial load.