Changeset fef38e8 in sasview for src/sas/qtgui/Calculators


Ignore:
Timestamp:
Sep 13, 2017 6:24:34 AM (7 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
3c8242c
Parents:
9909967
Message:

Startup time improvements - hiding expensive imports and such

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Calculators/GenericScatteringCalculator.py

    r4d1eff2 rfef38e8  
    88from PyQt4 import QtCore 
    99from twisted.internet import threads 
    10 from mpl_toolkits.mplot3d import Axes3D 
    1110 
    1211import sas.qtgui.Utilities.GuiUtils as GuiUtils 
    13  
    1412from sas.qtgui.Utilities.GenericReader import GenReader 
    15  
    1613from sas.sascalc.dataloader.data_info import Detector 
    1714from sas.sascalc.dataloader.data_info import Source 
    1815from sas.sascalc.calculator import sas_gen 
    19  
    20 from sas.qtgui.Plotting.Arrow3D import Arrow3D 
    2116from sas.qtgui.Plotting.PlotterBase import PlotterBase 
    2217from sas.qtgui.Plotting.Plotter2D import Plotter2D 
    2318from sas.qtgui.Plotting.Plotter import Plotter 
     19 
    2420from sas.qtgui.Plotting.PlotterData import Data1D 
    2521from sas.qtgui.Plotting.PlotterData import Data2D 
     
    704700        if data is None: 
    705701            return 
     702        # This import takes forever - place it here so the main UI starts faster 
     703        from mpl_toolkits.mplot3d import Axes3D 
    706704        color_dic = {'H': 'blue', 'D': 'purple', 'N': 'orange', 
    707705                     'O': 'red', 'C': 'green', 'P': 'cyan', 'Other': 'k'} 
     
    781779        if has_arrow and len(pos_x) > 0: 
    782780            def _draw_arrow(input=None, update=None): 
     781                # import moved here for performance reasons 
     782                from sas.qtgui.Plotting.Arrow3D import Arrow3D 
    783783                """ 
    784784                draw magnetic vectors w/arrow 
Note: See TracChangeset for help on using the changeset viewer.