Hi Kees,
This forum is for .NET programming; your questions seems to be about Lua so this isn't really the best place to get help with that.
However, you'll probably get better performance by using the lua event system for LVars:
event.Lvar("lvarname", interval, "function-name")
This will call the specified function when the value of the LVar changes. That function can then set the value in the offset. I think this will reduce the processing from the current situation where you are reading the writing every LVAR every 100ms.
I don't really know lua that well, so If you want more information about this, please ask John Downson in the main FSUIPC forum (not any of the sub-forums) at the link below.
https://forum.simflight.com/forum/30-fsuipc-support-pete-dowson-modules/
Paul