Unfortunately it is not my db to share.
But it’s complete hung now on the entity screen. Not OutOfMemory but getting there. It’s lasted a lot longer once I got rid of a bunch of ternary expressions.
REMOVED IMAGE BECAUSE OF CUSTOMER NAME

Call stack:
System.dll!System.Text.RegularExpressions.Regex.Regex(string pattern, System.Text.RegularExpressions.RegexOptions options, System.TimeSpan matchTimeout, bool useCache) Line 269
at f:\dd\NDP\fx\src\regex\system\text\regularexpressions\Regex.cs(269)
System.dll!System.Text.RegularExpressions.Regex.IsMatch(string input, string pattern) Line 726
at f:\dd\NDP\fx\src\regex\system\text\regularexpressions\Regex.cs(726)
Samba.Services.dll!Samba.Services.Implementations.PrinterModule.ValueChangers.FunctionRegistry.ExecuteFunctions.AnonymousMethod__2(Samba.Services.Implementations.PrinterModule.ValueChangers.IFunctionData<object> x) Line 562
at C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\ValueChangers\FunctionRegistry.cs(562)
System.Core.dll!System.Linq.Enumerable.WhereSelectEnumerableIterator<Samba.Services.Implementations.PrinterModule.ValueChangers.IFunctionData<object>, Samba.Services.Implementations.PrinterModule.ValueChangers.FunctionExecutor>.MoveNext()
System.Core.dll!System.Linq.Enumerable.ConcatIterator<Samba.Services.Implementations.PrinterModule.ValueChangers.FunctionExecutor>(System.Collections.Generic.IEnumerable<Samba.Services.Implementations.PrinterModule.ValueChangers.FunctionExecutor> first, System.Collections.Generic.IEnumerable<Samba.Services.Implementations.PrinterModule.ValueChangers.FunctionExecutor> second)
System.Core.dll!System.Linq.Buffer<Samba.Services.Implementations.PrinterModule.ValueChangers.FunctionExecutor>.Buffer(System.Collections.Generic.IEnumerable<Samba.Services.Implementations.PrinterModule.ValueChangers.FunctionExecutor> source)
System.Core.dll!System.Linq.OrderedEnumerable<Samba.Services.Implementations.PrinterModule.ValueChangers.FunctionExecutor>.GetEnumerator()
Samba.Services.dll!Samba.Services.Implementations.PrinterModule.ValueChangers.FunctionRegistry.ExecuteFunctions<Samba.Domain.Models.Tickets.OrderTagValue>(string content, System.Lazy<Samba.Domain.Models.Tickets.OrderTagValue> model) Line 566
at C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\ValueChangers\FunctionRegistry.cs(566)
Samba.Services.dll!Samba.Services.Implementations.PrinterModule.ValueChangers.AbstractValueChanger<Samba.Domain.Models.Tickets.OrderTagValue>.ReplaceValues(string templatePart, Samba.Domain.Models.Tickets.OrderTagValue model, Samba.Domain.Models.Settings.PrinterTemplate printerTemplate) Line 195
at C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\ValueChangers\AbstractValueChanger.cs(195)
Samba.Services.dll!Samba.Services.Implementations.PrinterModule.ValueChangers.AbstractValueChanger<Samba.Domain.Models.Tickets.OrderTagValue>.GetValue(Samba.Domain.Models.Settings.PrinterTemplate template, Samba.Domain.Models.Tickets.OrderTagValue model) Line 184
at C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\ValueChangers\AbstractValueChanger.cs(184)
Samba.Services.dll!Samba.Services.Implementations.PrinterModule.ValueChangers.AbstractValueChanger<System.__Canon>.GetValue.AnonymousMethod__0(System.__Canon x) Line 108
at C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\ValueChangers\AbstractValueChanger.cs(108)
System.Core.dll!System.Linq.Enumerable.SelectManyIterator<Samba.Domain.Models.Tickets.OrderTagValue, string>(System.Collections.Generic.IEnumerable<Samba.Domain.Models.Tickets.OrderTagValue> source, System.Func<Samba.Domain.Models.Tickets.OrderTagValue, System.Collections.Generic.IEnumerable<string>> selector)
mscorlib.dll!string.Join(string separator, System.Collections.Generic.IEnumerable<string> values) Line 180
at f:\dd\ndp\clr\src\BCL\system\string.cs(180)
Samba.Services.dll!Samba.Services.Implementations.PrinterModule.ValueChangers.AbstractValueChanger<Samba.Domain.Models.Tickets.OrderTagValue>.GetValue(Samba.Domain.Models.Settings.PrinterTemplate template, System.Collections.Generic.IEnumerable<Samba.Domain.Models.Tickets.OrderTagValue> models) Line 108
at C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\ValueChangers\AbstractValueChanger.cs(108)
Samba.Services.dll!Samba.Services.Implementations.PrinterModule.ValueChangers.AbstractValueChanger<Samba.Domain.Models.Tickets.OrderTagValue>.Replace.AnonymousMethod__0() Line 79
at C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\ValueChangers\AbstractValueChanger.cs(79)
Samba.Services.dll!Samba.Services.Implementations.PrinterModule.ValueChangers.Helper.FormatData<System.__Canon>(string data, string tag, System.Func<System.__Canon> valueFunc, System.Func<System.__Canon, string> toStringFunc) Line 13
at C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\ValueChangers\Helper.cs(13)
Samba.Services.dll!Samba.Services.Implementations.PrinterModule.ValueChangers.AbstractValueChanger<Samba.Domain.Models.Tickets.OrderTagValue>.Replace(Samba.Domain.Models.Settings.PrinterTemplate template, string content, System.Collections.Generic.IEnumerable<Samba.Domain.Models.Tickets.OrderTagValue> models) Line 79
at C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\ValueChangers\AbstractValueChanger.cs(79)
Samba.Services.dll!Samba.Services.Implementations.PrinterModule.ValueChangers.OrderValueChanger.ReplaceTemplateValues(string templatePart, Samba.Domain.Models.Tickets.Order model, Samba.Domain.Models.Settings.PrinterTemplate template) Line 104
at C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\ValueChangers\OrderValueChanger.cs(104)
Samba.Services.dll!Samba.Services.Implementations.PrinterModule.ValueChangers.AbstractValueChanger<Samba.Domain.Models.Tickets.Order>.ReplaceValues(string templatePart, Samba.Domain.Models.Tickets.Order model, Samba.Domain.Models.Settings.PrinterTemplate printerTemplate) Line 194
at C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\ValueChangers\AbstractValueChanger.cs(194)
Samba.Services.dll!Samba.Services.Implementations.PrinterModule.ValueChangers.AbstractValueChanger<Samba.Domain.Models.Tickets.Order>.GetValue(Samba.Domain.Models.Settings.PrinterTemplate template, Samba.Domain.Models.Tickets.Order model) Line 184
at C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\ValueChangers\AbstractValueChanger.cs(184)
Samba.Services.dll!Samba.Services.Implementations.PrinterModule.ValueChangers.AbstractValueChanger<System.__Canon>.GetValue.AnonymousMethod__0(System.__Canon x) Line 108
at C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\ValueChangers\AbstractValueChanger.cs(108)
System.Core.dll!System.Linq.Enumerable.SelectManyIterator<Samba.Domain.Models.Tickets.Order, string>(System.Collections.Generic.IEnumerable<Samba.Domain.Models.Tickets.Order> source, System.Func<Samba.Domain.Models.Tickets.Order, System.Collections.Generic.IEnumerable<string>> selector)
mscorlib.dll!string.Join(string separator, System.Collections.Generic.IEnumerable<string> values) Line 172
at f:\dd\ndp\clr\src\BCL\system\string.cs(172)
Samba.Services.dll!Samba.Services.Implementations.PrinterModule.ValueChangers.AbstractValueChanger<Samba.Domain.Models.Tickets.Order>.GetValue(Samba.Domain.Models.Settings.PrinterTemplate template, System.Collections.Generic.IEnumerable<Samba.Domain.Models.Tickets.Order> models) Line 108
at C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\ValueChangers\AbstractValueChanger.cs(108)
Samba.Services.dll!Samba.Services.Implementations.PrinterModule.ValueChangers.AbstractValueChanger<Samba.Domain.Models.Tickets.Order>.Replace.AnonymousMethod__0() Line 79
at C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\ValueChangers\AbstractValueChanger.cs(79)
Samba.Services.dll!Samba.Services.Implementations.PrinterModule.ValueChangers.Helper.FormatData<System.__Canon>(string data, string tag, System.Func<System.__Canon> valueFunc, System.Func<System.__Canon, string> toStringFunc) Line 13
at C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\ValueChangers\Helper.cs(13)
Samba.Services.dll!Samba.Services.Implementations.PrinterModule.ValueChangers.AbstractValueChanger<Samba.Domain.Models.Tickets.Order>.Replace(Samba.Domain.Models.Settings.PrinterTemplate template, string content, System.Collections.Generic.IEnumerable<Samba.Domain.Models.Tickets.Order> models) Line 79
at C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\ValueChangers\AbstractValueChanger.cs(79)
Samba.Services.dll!Samba.Services.Implementations.PrinterModule.ValueChangers.TicketValueChanger.ReplaceTemplateValues(string templatePart, Samba.Domain.Models.Tickets.Ticket model, Samba.Domain.Models.Settings.PrinterTemplate template) Line 47
at C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\ValueChangers\TicketValueChanger.cs(47)
Samba.Services.dll!Samba.Services.Implementations.PrinterModule.ValueChangers.AbstractValueChanger<Samba.Domain.Models.Tickets.Ticket>.ReplaceValues(string templatePart, Samba.Domain.Models.Tickets.Ticket model, Samba.Domain.Models.Settings.PrinterTemplate printerTemplate) Line 194
at C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\ValueChangers\AbstractValueChanger.cs(194)
Samba.Services.dll!Samba.Services.Implementations.PrinterModule.ValueChangers.AbstractValueChanger<Samba.Domain.Models.Tickets.Ticket>.GetValue(Samba.Domain.Models.Settings.PrinterTemplate template, Samba.Domain.Models.Tickets.Ticket model) Line 184
at C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\ValueChangers\AbstractValueChanger.cs(184)
Samba.Services.dll!Samba.Services.Implementations.PrinterModule.TicketFormatter.GetFormattedTicket(Samba.Domain.Models.Tickets.Ticket ticket, System.Collections.Generic.List<Samba.Domain.Models.Tickets.Order> lines, Samba.Domain.Models.Settings.PrinterTemplate printerTemplate, int lineCount) Line 41
at C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\TicketFormatter.cs(41)
Samba.Services.dll!Samba.Services.Implementations.PrinterModule.PrinterService.GetPrintingContent(Samba.Domain.Models.Tickets.Ticket ticket, string format, int width, int mergeLinesMethod) Line 140
at C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Services\Implementations\PrinterModule\PrinterService.cs(140)
Samba.Presentation.ClientLibrary.dll!Samba.Presentation.ClientLibrary.Modules.TicketModule.Widgets.TicketLister.TicketViewData.TicketData.get() Line 34
at C:\Users\Vehbi\Documents\Source\Repos\sambapos-v5-pro\Samba.Presentation.ClientLibrary\Modules\TicketModule\Widgets\TicketLister\TicketViewData.cs(34)
[Native to Managed Transition]
[Managed to Native Transition]
PresentationFramework.dll!MS.Internal.Data.PropertyPathWorker.GetValue(object item, int level)
PresentationFramework.dll!MS.Internal.Data.PropertyPathWorker.RawValue(int k)
PresentationFramework.dll!MS.Internal.Data.PropertyPathWorker.RawValue()
PresentationFramework.dll!MS.Internal.Data.ClrBindingWorker.RawValue()
PresentationFramework.dll!System.Windows.Data.BindingExpression.TransferValue(object newValue, bool isASubPropertyChange)
PresentationFramework.dll!System.Windows.Data.BindingExpression.Activate(object item)
PresentationFramework.dll!System.Windows.Data.BindingExpression.AttachToContext(System.Windows.Data.BindingExpression.AttachAttempt attempt)
PresentationFramework.dll!System.Windows.Data.BindingExpression.AttachOverride(System.Windows.DependencyObject target, System.Windows.DependencyProperty dp)
PresentationFramework.dll!System.Windows.Data.BindingExpressionBase.OnAttach(System.Windows.DependencyObject d, System.Windows.DependencyProperty dp)
PresentationFramework.dll!System.Windows.StyleHelper.GetInstanceValue(System.Windows.UncommonField<System.Collections.Specialized.HybridDictionary[]> dataField, System.Windows.DependencyObject container, System.Windows.FrameworkElement feChild, System.Windows.FrameworkContentElement fceChild, int childIndex, System.Windows.DependencyProperty dp, int i, ref System.Windows.EffectiveValueEntry entry)
PresentationFramework.dll!System.Windows.StyleHelper.GetChildValueHelper(System.Windows.UncommonField<System.Collections.Specialized.HybridDictionary[]> dataField, ref MS.Utility.ItemStructList<System.Windows.ChildValueLookup> valueLookupList, System.Windows.DependencyProperty dp, System.Windows.DependencyObject container, MS.Internal.FrameworkObject child, int childIndex, bool styleLookup, ref System.Windows.EffectiveValueEntry entry, out System.Windows.ValueLookupType sourceType, System.Windows.FrameworkElementFactory templateRoot)
PresentationFramework.dll!System.Windows.StyleHelper.GetChildValue(System.Windows.UncommonField<System.Collections.Specialized.HybridDictionary[]> dataField, System.Windows.DependencyObject container, int childIndex, MS.Internal.FrameworkObject child, System.Windows.DependencyProperty dp, ref MS.Utility.FrugalStructList<System.Windows.ChildRecord> childRecordFromChildIndex, ref System.Windows.EffectiveValueEntry entry, out System.Windows.ValueLookupType sourceType, System.Windows.FrameworkElementFactory templateRoot)
PresentationFramework.dll!System.Windows.StyleHelper.GetValueFromTemplatedParent(System.Windows.DependencyObject container, int childIndex, MS.Internal.FrameworkObject child, System.Windows.DependencyProperty dp, ref MS.Utility.FrugalStructList<System.Windows.ChildRecord> childRecordFromChildIndex, System.Windows.FrameworkElementFactory templateRoot, ref System.Windows.EffectiveValueEntry entry)
PresentationFramework.dll!System.Windows.StyleHelper.ApplyTemplatedParentValue(System.Windows.DependencyObject container, MS.Internal.FrameworkObject child, int childIndex, ref MS.Utility.FrugalStructList<System.Windows.ChildRecord> childRecordFromChildIndex, System.Windows.DependencyProperty dp, System.Windows.FrameworkElementFactory templateRoot)
PresentationFramework.dll!System.Windows.StyleHelper.InvalidatePropertiesOnTemplateNode(System.Windows.DependencyObject container, MS.Internal.FrameworkObject child, int childIndex, ref MS.Utility.FrugalStructList<System.Windows.ChildRecord> childRecordFromChildIndex, bool isDetach, System.Windows.FrameworkElementFactory templateRoot)
PresentationFramework.dll!System.Windows.FrameworkTemplate.InvalidatePropertiesOnTemplate(System.Windows.DependencyObject container, object currentObject)
PresentationFramework.dll!System.Windows.FrameworkTemplate.HandleBeforeProperties(object createdObject, ref System.Windows.DependencyObject rootObject, System.Windows.DependencyObject container, System.Windows.FrameworkElement feContainer, System.Windows.Markup.INameScope nameScope)
PresentationFramework.dll!System.Windows.FrameworkTemplate.LoadOptimizedTemplateContent.AnonymousMethod__2(object sender, System.Xaml.XamlObjectEventArgs args)
System.Xaml.dll!System.Xaml.XamlObjectWriter.OnBeforeProperties(object value)
System.Xaml.dll!System.Xaml.XamlObjectWriter.Logic_CreateAndAssignToParentStart(MS.Internal.Xaml.Context.ObjectWriterContext ctx)
System.Xaml.dll!System.Xaml.XamlObjectWriter.WriteEndObject()
System.Xaml.dll!System.Xaml.XamlWriter.WriteNode(System.Xaml.XamlReader reader)
PresentationFramework.dll!System.Windows.FrameworkTemplate.LoadTemplateXaml(System.Xaml.XamlReader templateReader, System.Xaml.XamlObjectWriter currentWriter)
PresentationFramework.dll!System.Windows.FrameworkTemplate.LoadTemplateXaml(System.Xaml.XamlObjectWriter objectWriter)
PresentationFramework.dll!System.Windows.FrameworkTemplate.LoadOptimizedTemplateContent(System.Windows.DependencyObject container, System.Windows.Markup.IComponentConnector componentConnector, System.Windows.Markup.IStyleConnector styleConnector, System.Collections.Generic.List<System.Windows.DependencyObject> affectedChildren, System.Windows.UncommonField<System.Collections.Hashtable> templatedNonFeChildrenField)
PresentationFramework.dll!System.Windows.FrameworkTemplate.LoadContent(System.Windows.DependencyObject container, System.Collections.Generic.List<System.Windows.DependencyObject> affectedChildren)
PresentationFramework.dll!System.Windows.StyleHelper.ApplyTemplateContent(System.Windows.UncommonField<System.Collections.Specialized.HybridDictionary[]> dataField, System.Windows.DependencyObject container, System.Windows.FrameworkElementFactory templateRoot, int lastChildIndex, System.Collections.Specialized.HybridDictionary childIndexFromChildID, System.Windows.FrameworkTemplate frameworkTemplate)
PresentationFramework.dll!System.Windows.FrameworkTemplate.ApplyTemplateContent(System.Windows.UncommonField<System.Collections.Specialized.HybridDictionary[]> templateDataField, System.Windows.FrameworkElement container)
PresentationFramework.dll!System.Windows.FrameworkElement.ApplyTemplate()
PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize)
PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize)
PresentationFramework.dll!System.Windows.Controls.WrapPanel.MeasureOverride(System.Windows.Size constraint)
PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize)
PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize)
PresentationCore.dll!System.Windows.ContextLayoutManager.UpdateLayout()
PresentationCore.dll!System.Windows.ContextLayoutManager.UpdateLayoutCallback(object arg)
PresentationCore.dll!System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
PresentationCore.dll!System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
PresentationCore.dll!System.Windows.Media.MediaContext.RenderMessageHandlerCore(object resizedCompositionTarget)
PresentationCore.dll!System.Windows.Media.MediaContext.AnimatedRenderMessageHandler(object resizedCompositionTarget)
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs)
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler)
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeImpl()
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(object state)
WindowsBase.dll!MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(object obj)
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 980
at f:\dd\ndp\clr\src\BCL\system\threading\executioncontext.cs(980)
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 928
at f:\dd\ndp\clr\src\BCL\system\threading\executioncontext.cs(928)
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Line 917
at f:\dd\ndp\clr\src\BCL\system\threading\executioncontext.cs(917)
WindowsBase.dll!MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext executionContext, System.Threading.ContextCallback callback, object state)
WindowsBase.dll!System.Windows.Threading.DispatcherOperation.Invoke()
WindowsBase.dll!System.Windows.Threading.Dispatcher.ProcessQueue()
WindowsBase.dll!System.Windows.Threading.Dispatcher.WndProcHook(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled)
WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled)
WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o)
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs)
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler)
WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs)
WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam)
[Native to Managed Transition]
[Managed to Native Transition]
WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame)
WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame frame)
PresentationFramework.dll!System.Windows.Application.RunDispatcher(object ignore)
PresentationFramework.dll!System.Windows.Application.RunInternal(System.Windows.Window window)
PresentationFramework.dll!System.Windows.Application.Run(System.Windows.Window window)
Samba.Presentation.exe!Samba.Presentation.App.Main()
Ealier when the entity screen would refresh and hang for a second and a half this was the call stack:

Ticket Template for lister widgets:
[LAYOUT]
<L00><size 26><color Black>[='{TICKET STATE:Pre-Order}'] {TICKET TYPE} #{TICKET NO}</color></size><br/>
[=('{TICKET TAG:Promise Time}' == '' ? '' : '<L00><size 26><color White>Promise Time: {TICKET TAG:Promise Time}</color></size><br/>')]
{CALL:format.SqlMins('{TICKET TAG:PromiseDateTime}')}
<L00><size 26><color White>Open for {CREATION MINUTES} min.</color></size><br/>
<L00><size 26><color White>{ENTITY NAME:Tables} {ENTITY DATA:Customers:Name}</color></size><br/>
{ORDERS}
<L00>
<L00><color Black><bold><size 26>{NOTE}</size></bold></color>
<C00><color Green><size 24><font Calibri>[=' {GROUP KEY} ']</font></size></color><br/>
[ORDERS]
<L00><color Black><bold><size 26><font Calibri>{QUANTITY} {PRODUCT NAME}</font></size></bold></color><font Consolas> <color DarkRed><size 20><italic>{PORTION}</italic></size></color></font><br/>
{SORTED ORDER TAGS}
[ORDERS:Gift]
<L00><color Green><bold><size 20><font Calibri>{QUANTITY} {PRODUCT NAME}</font></size></bold></color><font Consolas> <color red><size 20><italic>{PORTION}</italic></size></color></font><bold>Gift</bold><br/>
{SORTED ORDER TAGS}
[ORDERS:Void]
<L00><s><color Red><bold><size 16><font Calibri>{QUANTITY} {PRODUCT NAME}</font></size></bold></color><font Consolas> <color #FF55FF33><size 14><italic><if '{PORTION' != ''>{PORTION}</if></italic></size></color></font></s><bold> Void</bold><br/>
[SORTED ORDER TAGS]
<L00><size 22><color Black><font Calibri> {ORDER TAG QUANTITY} {ORDER TAG NAME} {ORDER TAG NOTE}</font></color></size><br/>
Script being called from the template:
function SqlMins(inputDateTimeString)
{
if (inputDateTimeString == '')
{
return '';
}
var openString = '<L00><size 26><color White>';
var closeString = '</color></size><br/>';
var q = "SELECT DATEDIFF(MINUTE, GETDATE(), '" + inputDateTimeString + "') AS Mins, CONVERT(VARCHAR(8), CAST('" + inputDateTimeString + "' AS TIME) , 100) AS Time;";
var r = sql.Query(q).First;
var rArray = r.split(',');
var mins = rArray[0];
var time = rArray[1];
return openString + 'DUE IN ' + mins + ' mins AT ' + time + closeString;
}