Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/15/15 11:57:50 (9 years ago)
Author:
dglaser
Message:

#2394:
Changed Web.config compilation from debug to release to force script bundling.
Changed history loading type from lazy to eager loading to increase performance.
Fixed "getCoreStatus" typo in statusCtrl.js

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Services.WebApp.Status/3.3/WebApi/DataController.cs

    r12443 r12445  
    2222using System;
    2323using System.Collections.Generic;
     24using System.Data.Linq;
    2425using System.Linq;
    2526using System.Web.Http;
     
    7273        var activeSlaves = onlineSlaves.Where(s => s.IsAllowedToCalculate).ToList();
    7374        var calculatingSlaves = activeSlaves.Where(s => s.SlaveState == SlaveState.Calculating).ToList();
    74 
    7575        int calculatingMemory = calculatingSlaves.Any() ? (int)calculatingSlaves.Sum(s => s.Memory) / 1024 : 0;
    7676        int freeCalculatingMemory = calculatingSlaves.Any() ? (int)calculatingSlaves.Sum(s => s.FreeMemory) / 1024 : 0;
     
    128128      }
    129129      using (var db = new HiveDataContext()) {
     130        DataLoadOptions loadOptions = new DataLoadOptions();
     131        loadOptions.LoadWith<Statistics>(o => o.SlaveStatistics);
     132        db.LoadOptions = loadOptions;
     133        db.DeferredLoadingEnabled = false;
    130134        var statistics = db.Statistics.Where(s => s.Timestamp >= start && s.Timestamp <= end)
    131                                       .OrderBy(s => s.Timestamp);
     135                                      .OrderBy(s => s.Timestamp)
     136                                      .ToList();
    132137        var status = new DTO.Status {
    133138          CoreStatus = new DTO.CoreStatus(),
Note: See TracChangeset for help on using the changeset viewer.