Hi Eli,
Thanks for the quick response!
Excuse me if I am talking nonsense - my understanding is that there are Emacs threads(the threads that are available using elisp code) which run cooperatively and there are OS level threads which for example read the output of a process and then pass it to the filter function as a string and they might run in parallel and I was talking about running the pre-filter function into such thread.
If this is not the case, I guess it won't be easy to spawn new os thread and run eventually *pure* function to process the output?
Alternatively, I was thinking about creating some faster emacs specific binary serialization/deserialization of data structures so elisp programmers could move the parsing into separate emacs instance(ala
https://github.com/jwiegley/emacs-async) and then consume the output.
Thanks,
Ivan