Opened 12 years ago

Closed 12 years ago

#7351 closed enhancement (fixed)

optimize import of singular.py

Reported by: was Owned by: was
Priority: major Milestone: sage-4.3
Component: interfaces Keywords:
Cc: robertwb Merged in: sage-4.3.alpha1
Authors: Martin Albrecht Reviewers: Robert Bradshaw
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

I'm using sage -startuptime.

The singular interface also looks like a *major* culprit:

              sage.interfaces.singular: 0.329 (sage.rings.ideal)
               sage.structure.sequence: 0.000 (sage.interfaces.singular)

Looking, I see that a *horrendously* time consuming function called 
"generate_docstring_dictionary()" is called whenever the file sage/interfaces/singular.py is imported.  This is completely pointless, and shouldn't happen until somebody actually tries to use the singular interface.  A few lines of code would immediately reduce the startup time of Sage by nearly a half second there. 

Attachments (1)

singular_startup_time.patch (1.3 KB) - added by malb 12 years ago.
this fixes the issue for me

Download all attachments as: .zip

Change History (6)

comment:1 Changed 12 years ago by robertwb

  • Cc robertwb added

Changed 12 years ago by malb

this fixes the issue for me

comment:2 Changed 12 years ago by malb

  • Status changed from new to needs_review

comment:3 Changed 12 years ago by robertwb

  • Status changed from needs_review to positive_review

Nice. Thanks!

comment:4 Changed 12 years ago by mhansen

  • Authors set to Martin Albrecht
  • Reviewers set to Robert Bradshaw

comment:5 Changed 12 years ago by mhansen

  • Merged in set to sage-4.3.alpha1
  • Report Upstream set to N/A
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.