Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOI slow to import and precompile #2442

Closed
theogf opened this issue Feb 21, 2024 · 4 comments
Closed

MOI slow to import and precompile #2442

theogf opened this issue Feb 21, 2024 · 4 comments
Labels

Comments

@theogf
Copy link

theogf commented Feb 21, 2024

I noticed that when running

@time_imports using Optim

Most of the time was taken by MathOptInterface:

2243.5 ms  MathOptInterface
22.1 ms  Optim

Additionally the precompilation takes a really long time. It surprising for a package that is supposed to be an interface?

This was run on Julia 1.9.3

@odow
Copy link
Member

odow commented Feb 21, 2024

The name is misleading 😄 In fact, MOI is much more than an interface, and it is one of the largest Julia packages.

See https://julialang.org/blog/2021/08/general-survey/

image

That was in 2021. Now I get:

(base) oscar@Oscars-MBP MathOptInterface % cloc src
     179 text files.
     179 unique files.                                          
       0 files ignored.

github.com/AlDanial/cloc v 1.90  T=0.73 s (246.2 files/s, 121811.9 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Julia                          177           9174          17241          60660
JSON                             1              0              0           1281
Markdown                         1             43              0            181
-------------------------------------------------------------------------------
SUM:                           179           9217          17241          62122
-------------------------------------------------------------------------------

cc @blegat, why add MOI to Optim directly instead of a package extension?

@odow odow added the wontfix label Feb 21, 2024
@odow
Copy link
Member

odow commented Feb 21, 2024

Regardless. Closing this as won't fix. You could open an issue at Optim.jl about moving MathOptInterface to a package extension.

@odow odow closed this as completed Feb 21, 2024
@blegat
Copy link
Member

blegat commented Feb 21, 2024

Yes, it could be moved as a package extension

@theogf
Copy link
Author

theogf commented Feb 21, 2024

Cool! I'll make a PR to Optim.jl then!

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

No branches or pull requests

3 participants