Skip to content

Serial section when compiling a jx9 program? #132

@mdorier

Description

@mdorier

I was trying to optimize the performance of a multi-threaded code in which multiple threads could execute Jx9 code against the same database. Unqlite is compiled with multithreading support. I noticed that unqlite locks the database's mutex while compiling the Jx9 code, here:

SyMutexEnter(sUnqlMPGlobal.pMutexMethods, pDb->pMutex); /* NO-OP if sUnqlMPGlobal.nThreadingLevel != UNQLITE_THREAD_LEVEL_MULTI */

This prevents multiple threads from compiling VMs in parallel. Whether VMs can execute in parallel is another story, but I was at least expecting to be able to compile Jx9 programs concurrently, in particular because timing information shows that this compilation is what takes up most of the time in my scenario. Is there a reason for this part of the code to be serial?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions