CorrM/Unreal-Finder-Tool

Sorting is slow

Closed this issue · 1 comments

Everything works great for me building form the source except the sorting after generation

I comment out below and it generates the SDK, If I leave it in it takes 2 hours and sometimes doesnt complete. The generation on my PC already takes 45 minutes without sorting (20k objects)

SdkGenerator::ProcessPackages

	if (!packages.empty())
	{
		state = "Sorting";
		// std::sort doesn't work, so use a simple bubble sort
		//std::sort(std::begin(packages), std::end(packages), PackageDependencyComparer());
		const PackageDependencyComparer comparer;
		for (auto i = 0u; i < packages.size() - 1; ++i)
		{
			for (auto j = 0u; j < packages.size() - i - 1; ++j)
			{
				state = std::to_string(i) + " - " + std::to_string(j);

				if (!comparer(packages[j], packages[j + 1]))
				{
					std::swap(packages[j], packages[j + 1]);
				}
			}
		}
	}
CorrM commented

i know sorting is shity, it's form the base generator.
i Already fixed all this kind of problems in UDA but it's still in development and i don't recommend to use it now.

so until the release use UFT.