Thanks to visit codestin.com
Credit goes to github.com

Skip to content

PythonEngine.Initialize slow #598

Closed
Closed
@goerch

Description

@goerch

Environment

  • Pythonnet version: 2.3.0
  • Python version: 3.6
  • Operating System: Windows 7

Details

When embedding Python in an ASP.NET MVC 5 web application, PythonEngine.Initialize needs a couple of seconds to eagerly load the names of around 50 module namespaces in ModuleObject.LoadNames. If I replace the implementation of LoadNames with a NOP, time spent in PythonEngine.Initialize drops to below 100 ms and the web application still seems to work.

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