private void ShowModel(Operation operation)
        {
            while (operation.Queue.TryTake(out IDataItem item, Timeout.Infinite))
            {
                Application.Current.Dispatcher.InvokeBackground(() =>
                {
                    modelService.AddOrUpdateItem(item, operation.Id);

                    for (int i = 0; i < BatchSize; i++)
                    {
                        if (!operation.Queue.TryTake(out item, 0))
                        {
                            break;
                        }

                        modelService.AddOrUpdateItem(item, operation.Id);
                    }
                });
            }

            BlockingCollection <IDataItem> queue = new BlockingCollection <IDataItem>();

            Application.Current.Dispatcher.InvokeBackground(() =>
            {
                IReadOnlyList <DataNode> allQueuedNodes = modelService.GetAllQueuedNodes();
                allQueuedNodes.ForEach(node => queue.Add(node));
                queue.CompleteAdding();
            });


            while (queue.TryTake(out IDataItem item, Timeout.Infinite))
            {
                Application.Current.Dispatcher.InvokeBackground(() =>
                {
                    modelService.AddOrUpdateItem(item, operation.Id);

                    for (int i = 0; i < BatchSize; i++)
                    {
                        if (!queue.TryTake(out item, 0))
                        {
                            break;
                        }

                        modelService.AddOrUpdateItem(item, operation.Id);
                    }
                });
            }
        }