首页 > 解决方案 > 更新到 xamarin forms 5 导致调试速度非常慢

问题描述

从 4.8 升级到 Xamarin Forms 5.0.0.2012 会使应用程序(仅在调试模式下)在每次交互时冻结几秒钟并产生大量输出:

Thread started: <Thread Pool> #41   
[Mono] GC_BRIDGE waiting for bridge processing to finish    
[Mono] GC_TAR_BRIDGE bridges 0 objects 0 opaque 0 colors 0 colors-bridged 0 colors-visible 169 xref 4 cache-hit 0 cache-semihit 0 cache-miss 0 setup 0.07ms tarjan 0.09ms scc-setup 0.06ms gather-xref 0.00ms xref-setup 0.00ms cleanup 0.00ms  
[Mono] GC_BRIDGE: Complete, was running for 0.05ms  
[Mono] GC_MINOR: (Nursery full) time 15.02ms, stw 18.82ms promoted 1445K major size: 33920K in use: 32001K los size: 9472K in use: 7121K    
Thread started: <Thread Pool> #42   
Thread started: <Thread Pool> #43   
Thread started: <Thread Pool> #44   
Thread started: <Thread Pool> #45   
Thread started: <Thread Pool> #46   
Thread started: <Thread Pool> #47   
Thread started: <Thread Pool> #48   
Thread started: <Thread Pool> #49   
Thread started: <Thread Pool> #50   
Thread started: <Thread Pool> #51   
[Mono] GC_BRIDGE waiting for bridge processing to finish    
[Mono] GC_TAR_BRIDGE bridges 0 objects 0 opaque 0 colors 0 colors-bridged 0 colors-visible 169 xref 4 cache-hit 0 cache-semihit 0 cache-miss 0 setup 0.07ms tarjan 0.09ms scc-setup 0.06ms gather-xref 0.00ms xref-setup 0.00ms cleanup 0.00ms  
[Mono] GC_BRIDGE: Complete, was running for 0.07ms  
[Mono] GC_MINOR: (Nursery full) time 11.92ms, stw 14.43ms promoted 926K major size: 34896K in use: 32961K los size: 12544K in use: 10620K   
[mono] Full thread dump:    
[Mono] GC_TAR_BRIDGE bridges 0 objects 0 opaque 0 colors 0 colors-bridged 0 colors-visible 169 xref 4 cache-hit 0 cache-semihit 0 cache-miss 0 setup 0.07ms tarjan 0.09ms scc-setup 0.06ms gather-xref 0.00ms xref-setup 0.00ms cleanup 0.00ms  
[Mono] GC_BRIDGE waiting for bridge processing to finish    
[Mono] GC_BRIDGE: Complete, was running for 0.07ms  
[Mono] GC_MINOR: (Nursery full) time 13.09ms, stw 15.10ms promoted 860K major size: 35728K in use: 33849K los size: 17664K in use: 15619K   
[Mono] GC_TAR_BRIDGE bridges 0 objects 0 opaque 0 colors 0 colors-bridged 0 colors-visible 169 xref 4 cache-hit 0 cache-semihit 0 cache-miss 0 setup 0.07ms tarjan 0.09ms scc-setup 0.06ms gather-xref 0.00ms xref-setup 0.00ms cleanup 0.00ms  
[Mono] GC_BRIDGE: Complete, was running for 0.07ms  
[Mono] GC_MINOR: (Concurrent start) time 3.81ms, stw 13.08ms promoted 1K major size: 35728K in use: 33851K los size: 17664K in use: 15619K  
[Mono] GC_MAJOR_CONCURRENT_START: (LOS overflow)    
[Mono] GC_BRIDGE waiting for bridge processing to finish

知道如何恢复调试器的可用性吗?

标签: formsperformancedebuggingxamarin

解决方案


从 ListView 中删除 CachingStrategy="RecycleElement" 是部分解决方案

Xamarin garba 集合经常运行


推荐阅读