Skip to content

increasing number of cores significantly slows down python compilation #12

Description

@yazdanbakhsh

We are trying to run python compilation in parallel > 120 # of workers. However, we noticed that specifically for python files (not so much for C++) the compilation time increases significantly (almost to 1 minute). Compiling the code locally on the compiler server using the following command, returns immediately (less than a second).

The more interesting observation is that the python compilation increases over time as the queries arrive to the server.

import sys

def main():
data = sys.stdin.read().strip()
    numbers = list(map(int, data.split()))
    print(sum(numbers))

if __name__ == '__main__':
    main()


COMMAND: python3 -W ignore -m py_compile test.py
Sorry: IndentationError: expected an indented block after function definition on line 3 (test.py, line 4)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions