CSC/ECE 517 Fall 2013/oss E804 spb: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 16: Line 16:
'''What needs to be done:'''  
'''What needs to be done:'''  
:This code is very slow, due to many factors.  Two of the most prominent are the fact that separate db queries are used for each rubric that has been filled out by anyone associated with the assignment; these queries are made sequentially while the HTML page is being written; and the fact that HTML for the whole page is generated, largely by controller methods, before anything is displayed.
:This code is very slow, due to many factors.  Two of the most prominent are the fact that separate db queries are used for each rubric that has been filled out by anyone associated with the assignment; these queries are made sequentially while the HTML page is being written; and the fact that HTML for the whole page is generated, largely by controller methods, before anything is displayed.
Need to refactor the score.rb model which contains complex methods.
:Need to refactor the score.rb model which contains complex methods.

Revision as of 04:44, 30 October 2013

Expertiza Code Refactoring

Introduction

A way to query db models to return scores, without UI changes


Project Description

Classes:

models/score.rb (159 lines)
grades_controller.rb (241 lines)

What needs to be done:

This code is very slow, due to many factors. Two of the most prominent are the fact that separate db queries are used for each rubric that has been filled out by anyone associated with the assignment; these queries are made sequentially while the HTML page is being written; and the fact that HTML for the whole page is generated, largely by controller methods, before anything is displayed.
Need to refactor the score.rb model which contains complex methods.