Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/08/15 15:51:32 (9 years ago)
Author:
dglaser
Message:

#2388:

HeuristicLab.Services.Access:
HeuristicLab.Services.Access.DataAccess:

  • Changed connection strings and certificates for local usage

HeuristicLab.Services.Hive.DataAccess:

  • Added compiled queries for frequently used queries
  • Integrated string queries from OptimizedHiveDao

HeuristicLab.Services.Hive:

  • Added NewHeartbeatManager.cs
  • Added NewRoundRobinTaskScheduler.cs
  • Added PerformanceLogger
  • Updated AuthoriziationManager
  • Updated NewHiveService
    • Added Regions
    • Implemented missing methods
    • Improved performance of several queries

HeuristicLab.Services.WebApp.Status:

  • Fixed a bug which caused an error when calculating the average waiting time.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/ResourceDao.cs

    r12468 r12691  
    2929
    3030    public override Resource GetById(Guid id) {
    31       return Table.SingleOrDefault(x => x.ResourceId == id);
     31      return GetByIdQuery(DataContext, id);
     32    }
     33
     34    public Resource GetByName(string name) {
     35      return GetByNameQuery(DataContext, name);
    3236    }
    3337
     
    3539      return Table.Where(x => x.OwnerUserId != null);
    3640    }
     41
     42    #region Compiled queries
     43    private static readonly Func<DataContext, Guid, Resource> GetByIdQuery =
     44      CompiledQuery.Compile((DataContext db, Guid resourceId) =>
     45        (from resource in db.GetTable<Resource>()
     46         where resource.ResourceId == resourceId
     47         select resource).SingleOrDefault());
     48
     49    private static readonly Func<DataContext, string, Resource> GetByNameQuery =
     50     CompiledQuery.Compile((DataContext db, string name) =>
     51       (from resource in db.GetTable<Resource>()
     52        where resource.Name == name
     53        select resource).FirstOrDefault());
     54    #endregion
    3755  }
    3856}
Note: See TracChangeset for help on using the changeset viewer.