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 interface moved to ext #268

Merged
merged 6 commits into from
Mar 7, 2024
Merged

MOI interface moved to ext #268

merged 6 commits into from
Mar 7, 2024

Conversation

sshin23
Copy link
Member

@sshin23 sshin23 commented Jun 15, 2023

This PR makes MOI a weak dependency and conditionally loaded upon import MathOptInterface.

This significantly reduces the initial loading time of MadNLP.

Before

julia> @time using MadNLP
  3.077277 seconds (2.96 M allocations: 179.715 MiB, 4.78% gc time, 0.54% compilation time)

After

julia> @time using MadNLP
  0.117276 seconds (71.44 k allocations: 4.938 MiB, 7.39% compilation time)

@sshin23 sshin23 changed the title Moi interface moved to ext MOI interface moved to ext Jun 15, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jun 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.89%. Comparing base (6198b24) to head (3988ad7).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #268      +/-   ##
==========================================
- Coverage   70.25%   69.89%   -0.36%     
==========================================
  Files          42       40       -2     
  Lines        4626     3897     -729     
==========================================
- Hits         3250     2724     -526     
+ Misses       1376     1173     -203     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sshin23 sshin23 requested a review from frapac March 6, 2024 22:38
Copy link
Member

@frapac frapac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to merge!

src/MadNLP.jl Outdated
@@ -32,6 +26,6 @@ include(joinpath("KKT", "KKTsystem.jl"))
include(joinpath("LinearSolvers","linearsolvers.jl"))
include("options.jl")
include(joinpath("IPM", "IPM.jl"))
include(joinpath("Interfaces","interfaces.jl"))
include("ext.jl")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would maybe rename ext.jl as interface.jl or external_interface.jl. What do you think?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed it as extension_templates.jl

@sshin23 sshin23 merged commit 41062e4 into master Mar 7, 2024
7 checks passed
@frapac frapac deleted the ss/MOI_ext branch April 10, 2024 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants