syncode icon indicating copy to clipboard operation
syncode copied to clipboard

Support multibatch multithreaded parsing

Open shubhamugare opened this issue 1 year ago • 2 comments

If we are parsing multiple partial codes the parsers currently run sequentially in a single thread, this should be much faster parallel in multiple threads. Example Options

shubhamugare avatar Jan 29 '24 18:01 shubhamugare

the second link says that we should use asyncio or threading only if the program is io_bound. I wonder if multithread benefit the parsing. Using multiprocess, I met the problem that if we use spawn as start method, process init takes a long time; but fork cannot be compatible with cuda environment, is there any advice? thx!

upd: using other language without GIL might be a solution?

victbr avatar Aug 21 '24 09:08 victbr

Hi @victbr,

Yes, you are right, I think using other languages like Rust without GIL is probably the best solution for this.

shubhamugare avatar Aug 30 '24 21:08 shubhamugare