fix: предотвратить квадратичную работу при обнаружении перекрытий UV - #190
fix: предотвратить квадратичную работу при обнаружении перекрытий UV#190SashaRX wants to merge 1 commit into
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 37 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
Comment |
|
Фикс вошёл в консолидированную ветку Generated by Claude Code |
Motivation
SpatialPartitionerвыполняла попарные сравнения всех граней в каждой заполненной ячейке сетки и могла приводить к экспоненциальному/квадратичному времени на патогенных мешах, зависающему Unity Editor.Description
FacesShareVertexперебор на линейный подсчёт вхождений: собираются счётчики вершин, пар и троек и применяется формула включений‑исключений для выявления граней, не имеющих общих вершин с другими в той же ячейке, что делает фильтрацию линейной по числу вхождений в ячейки и предотвращает квадратичную взрывную работу.HashSet<int>для детектора перекрытий —DetectOverlapтеперь вызывается безfaceVertsпосле построенияadjacency(флуд‑филл остаётся).FaceVertexKey,VertexPairKeyиIncrementCountдля эффективного учёта сочетаний вершин.Tests/Editor/SpatialPartitionerTests.csс двумя регресс‑случаями и обновлена документацияDocumentation~/EXPERIMENTS.mdописанием эксперимента и применённого подхода.Testing
git diff --check, проверка наличия Unity.metaдля файлов вEditor/,Plugins/,Shaders/иTests/, а также валидацияpackage.json(semver) — все проверки прошли.SpatialPartitionerTests) не исполнялись в CI контейнере, так как Unity Editor отсутствует в среде; тесты добавлены для локального запуска в Unity Editor и должны быть запущены там для окончательной валидации поведения в реальном Editor окружении.Codex Task