diff --git a/cms/djangoapps/contentstore/views/assets.py b/cms/djangoapps/contentstore/views/assets.py index 2334c61b4c..94bfa55b58 100644 --- a/cms/djangoapps/contentstore/views/assets.py +++ b/cms/djangoapps/contentstore/views/assets.py @@ -315,6 +315,8 @@ def import_course(request, org, course, name): create_all_course_groups(request.user, course_items[0].location) + logging.debug('created all course groups at {0}'.format(course_items[0].location)) + return HttpResponse(json.dumps({'Status': 'OK'})) else: course_module = modulestore().get_item(location) diff --git a/cms/envs/dev.py b/cms/envs/dev.py index 0b0a62f05d..42a6f706b6 100644 --- a/cms/envs/dev.py +++ b/cms/envs/dev.py @@ -150,14 +150,13 @@ DEBUG_TOOLBAR_PANELS = ( 'debug_toolbar.panels.sql.SQLDebugPanel', 'debug_toolbar.panels.signals.SignalDebugPanel', 'debug_toolbar.panels.logger.LoggingPanel', - 'debug_toolbar_mongo.panel.MongoDebugPanel', # Enabling the profiler has a weird bug as of django-debug-toolbar==0.9.4 and # Django=1.3.1/1.4 where requests to views get duplicated (your method gets # hit twice). So you can uncomment when you need to diagnose performance # problems, but you shouldn't leave it on. # 'debug_toolbar.panels.profiling.ProfilingDebugPanel', - ) +) DEBUG_TOOLBAR_CONFIG = { 'INTERCEPT_REDIRECTS': False @@ -165,7 +164,7 @@ DEBUG_TOOLBAR_CONFIG = { # To see stacktraces for MongoDB queries, set this to True. # Stacktraces slow down page loads drastically (for pages with lots of queries). -DEBUG_TOOLBAR_MONGO_STACKTRACES = True +DEBUG_TOOLBAR_MONGO_STACKTRACES = False # disable NPS survey in dev mode MITX_FEATURES['STUDIO_NPS_SURVEY'] = False diff --git a/cms/envs/dev_dbperf.py b/cms/envs/dev_dbperf.py new file mode 100644 index 0000000000..b490702d37 --- /dev/null +++ b/cms/envs/dev_dbperf.py @@ -0,0 +1,26 @@ +""" +This configuration is to turn on the Django Toolbar stats for DB access stats, for performance analysis +""" +from .dev import * + +DEBUG_TOOLBAR_PANELS = ( + 'debug_toolbar.panels.version.VersionDebugPanel', + 'debug_toolbar.panels.timer.TimerDebugPanel', + 'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel', + 'debug_toolbar.panels.headers.HeaderDebugPanel', + 'debug_toolbar.panels.request_vars.RequestVarsDebugPanel', + 'debug_toolbar.panels.sql.SQLDebugPanel', + 'debug_toolbar.panels.signals.SignalDebugPanel', + 'debug_toolbar.panels.logger.LoggingPanel', + 'debug_toolbar_mongo.panel.MongoDebugPanel' + + # Enabling the profiler has a weird bug as of django-debug-toolbar==0.9.4 and + # Django=1.3.1/1.4 where requests to views get duplicated (your method gets + # hit twice). So you can uncomment when you need to diagnose performance + # problems, but you shouldn't leave it on. + # 'debug_toolbar.panels.profiling.ProfilingDebugPanel', +) + +# To see stacktraces for MongoDB queries, set this to True. +# Stacktraces slow down page loads drastically (for pages with lots of queries). +DEBUG_TOOLBAR_MONGO_STACKTRACES = True diff --git a/common/lib/xmodule/xmodule/modulestore/xml_importer.py b/common/lib/xmodule/xmodule/modulestore/xml_importer.py index f24dad7cf0..856a30435c 100644 --- a/common/lib/xmodule/xmodule/modulestore/xml_importer.py +++ b/common/lib/xmodule/xmodule/modulestore/xml_importer.py @@ -143,7 +143,6 @@ def import_from_xml(store, data_dir, course_dirs=None, # finally loop through all the modules for module in xml_module_store.modules[course_id].itervalues(): - if module.category == 'course': # we've already saved the course module up at the top of the loop # so just skip over it in the inner loop @@ -177,6 +176,9 @@ def import_from_xml(store, data_dir, course_dirs=None, def import_module(module, store, course_data_path, static_content_store, source_course_location, dest_course_location, allow_not_found=False): + + logging.debug('processing import of module {0}...'.format(module.location.url())) + content = {} for field in module.fields: if field.scope != Scope.content: