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

better than luaCanRxWorkaround solution for lua CAN RX performance problem #6041

Open
rusefillc opened this issue Feb 24, 2024 · 4 comments
Open

Comments

@rusefillc
Copy link
Contributor

problem: #5841 due to extreme cost of lua_newtable on the order of 500us/0.5ms see #5841 (comment)

temporary quick solution f6ca672

a more elegant solution is desired:

rusefillc pushed a commit that referenced this issue Feb 24, 2024
mck1117 added a commit to FOME-Tech/fome-fw that referenced this issue Feb 26, 2024
@mck1117
Copy link
Member

mck1117 commented Feb 26, 2024

you may be interested in FOME-Tech/fome-fw@d10e274

@mck1117
Copy link
Member

mck1117 commented Feb 26, 2024

last column is average ms for the table create + writing values

image

@rusefillc
Copy link
Contributor Author

last column is average ms for the table create + writing values

yes and no - skipping GC is cool but garbage is still being populated and GC is in createtable by default probably because tables are heavy? You measurements are missing total GC times, are those available to us?

rusefillc pushed a commit that referenced this issue Feb 26, 2024
@mck1117
Copy link
Member

mck1117 commented Feb 26, 2024

It doesn't skip the gc entirely. It skips calling it in the tight loop of doing CAN reception, deferring it to happen later (which it does).

"total ms" is doLuaCanRx + invokeTick, doing 25 CAN frames every time with empty callbacks on the Lua side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants