<commit_before>﻿using System.ComponentModel.Composition;
using System.ComponentModel.Composition.Hosting;
using System.Globalization;
using System.IO;
using System.Runtime;
using System.Waf;
using System.Waf.Applications;
using System.Windows;
using System.Windows.Threading;
using Waf.DotNetPad.Applications.ViewModels;
using Waf.DotNetPad.Domain;
using Waf.DotNetPad.Presentation.Services;

namespace Waf.DotNetPad.Presentation;

public partial class App
{
    private AggregateCatalog catalog = null!;
    private CompositionContainer container = null!;
    private IEnumerable<IModuleController> moduleControllers = Array.Empty<IModuleController>();

    public App()
    {
        Directory.CreateDirectory(EnvironmentService.ProfilePath);
        ProfileOptimization.SetProfileRoot(EnvironmentService.ProfilePath);
        ProfileOptimization.StartProfile("Startup.profile");
    }

    protected override void OnStartup(StartupEventArgs e)
    {
        base.OnStartup(e);

#if !(DEBUG)<commit_msg>Remove ProfileOptimization as the startup performance was insignificant<commit_after>﻿using System.ComponentModel.Composition;
using System.ComponentModel.Composition.Hosting;
using System.Globalization;
using System.Waf;
using System.Waf.Applications;
using System.Windows;
using System.Windows.Threading;
using Waf.DotNetPad.Applications.ViewModels;
using Waf.DotNetPad.Domain;

namespace Waf.DotNetPad.Presentation;

public partial class App
{
    private AggregateCatalog catalog = null!;
    private CompositionContainer container = null!;
    private IEnumerable<IModuleController> moduleControllers = Array.Empty<IModuleController>();

    protected override void OnStartup(StartupEventArgs e)
    {
        base.OnStartup(e);

#if !DEBUG
{'fraction_non_alphanumeric': 0.084, 'fraction_numerical': 0.0, 'mean_word_length': 5.461254612546125, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4035911', 'n_tokens_mistral': 485, 'n_tokens_neox': 484, 'n_words': 105}