Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/23/13 18:33:15 (11 years ago)
Author:
pfleck
Message:

#2030
Changed Linq.Binary to byte array to avoid hash computation.
DataContext in HiveOperationContext is now lazy initialized.
Added missing HiveDao from last commit failure.

Location:
branches/HivePerformance/sources/HeuristicLab.Services.Hive/3.3
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HivePerformance/sources/HeuristicLab.Services.Hive/3.3/Convert.cs

    r9266 r9393  
    112112    public static void ToEntity(DT.TaskData source, DB.TaskData target) {
    113113      if ((source != null) && (target != null)) {
    114         target.TaskId = source.TaskId; target.Data = new Binary(source.Data); target.LastUpdate = source.LastUpdate;
     114        target.TaskId = source.TaskId;
     115        target.Data = source.Data;
     116        target.LastUpdate = source.LastUpdate;
    115117      }
    116118    }
     
    214216    public static void ToEntity(DT.PluginData source, DB.PluginData target) {
    215217      if ((source != null) && (target != null)) {
    216         target.PluginDataId = source.Id; target.PluginId = source.PluginId; target.Data = new Binary(source.Data); target.FileName = source.FileName;
     218        target.PluginDataId = source.Id;
     219        target.PluginId = source.PluginId;
     220        target.Data = source.Data;
     221        target.FileName = source.FileName;
    217222      }
    218223    }
  • branches/HivePerformance/sources/HeuristicLab.Services.Hive/3.3/HiveOperationContext.cs

    r9391 r9393  
    3939    }
    4040
    41     public HiveDataContext DataContext { get; private set; }
     41    private HiveDataContext dataContext;
     42    public HiveDataContext DataContext {
     43      get {
     44        if (dataContext == null) {
     45          dataContext = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString);
     46          //dataContext.Log = new DebugWriter();
     47        }
     48        return dataContext;
     49      }
     50    }
     51
    4252
    4353    public void Attach(OperationContext owner) {
    44       DataContext = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString);
    45       //DataContext.Log = new DebugWriter();
    4654    }
    4755
    4856    public void Detach(OperationContext owner) {
    49       DataContext.Dispose();
     57      if (dataContext != null) {
     58        dataContext.Dispose();
     59      }
    5060    }
    5161  }
Note: See TracChangeset for help on using the changeset viewer.