本文记录我参与的开源项目

WPF

水到非官方开发者了,但大部分都是修改文档和注释

Replace IsAssignableFrom to is pattern by lindexi · Pull Request #101 · dotnet/wpf

We use language keywords instead of BCL types by lindexi · Pull Request #102 · dotnet/wpf

Update the docs link by lindexi · Pull Request #3078 · dotnet/wpf

Remove special vs version on the link by lindexi · Pull Request #3160 · dotnet/wpf

Remove the custom HashSet class by lindexi · Pull Request #3738 · dotnet/wpf

Use Array.Empty instead of creating list in ResourceDictionaryDiagnostics by lindexi · Pull Request #3851 · dotnet/wpf

Make CustomGuids as readonly by lindexi · Pull Request #3907 · dotnet/wpf

Set the lock object as readonly by lindexi · Pull Request #939 · dotnet/wpf

Remove the unuse code in EventHandlersStore by lindexi · Pull Request #4636 · dotnet/wpf

表扬

Latest Community Issues addressed and PRs merged. · Issue #4302 · dotnet/wpf

优化启动性能 使用调用方法代替反射

预计能提升 0.0001 纳秒的启动性能

Calling AppContext.TryGetSwitch without Reflection in LocalAppContext.cs by lindexi · Pull Request #5522 · dotnet/wpf

优化橡皮擦性能

优化橡皮擦百分之二十的性能,通过缓存预先计算提升性能

Using Per-computed bounds in ErasingStroke by lindexi · Pull Request #4111 · dotnet/wpf

XAML 创建对象性能优化

最多可以提升3倍的 XAML 创建对象性能

Add XamlObjectCreationFactory to improve the performance of XAML creation of objects by lindexi · Pull Request #4026 · dotnet/wpf

笔迹性能优化

使用 readonly 方法,可以减少 WPF 方法调用的时候,拷贝结构体,可以提升笔迹的性能

Using readonly struct in WPF Ink module by lindexi · Pull Request #3908 · dotnet/wpf

Replace the Dictionary with HashSet in AppDomainShutdownMonitor

替换字典为 HashSet 用于减少内存和提升一点性能,详细请看性能测试

Replace the Dictionary with HashSet in AppDomainShutdownMonitor by lindexi · Pull Request #3932 · dotnet/wpf

Reduce memory usage by Array.Empty

使用 Array.Empty 可以减少内存分配,和提升创建对象的性能

Reduce memory usage by Array.Empty by lindexi · Pull Request #3085 · dotnet/wpf

使用 Array.Copy 提升 StylusPointCollection 数组拷贝性能

可以提升触摸时的触摸数据转发的性能,只要是碰到触摸,就可以用到此提升

Using Array.Copy to make array copy faster in StylusPointCollection by lindexi · Pull Request #5217 · dotnet/wpf

数组池优化

给 RenderData 使用上数组池,可以让一切元素渲染时,也许可以减少一点点数组申请。此更改不一定都是正向的,因为会让数组池数组耗尽,本更改的释放是不包括 RenderData 释放时的处理

Using ArrayPool in RenderData by lindexi · Pull Request #5392 · dotnet/wpf

Remove the unuse code. by lindexi · Pull Request #4010 · dotnet/wpf

给 Style 里面提升几乎可以忽略的性能

修改 MimeObjectFactory 集合容量

在 MimeObjectFactory 类里面将会包含一个默认的集合,但是这个集合给定的容量和实际运行时的容量不符合,默认给的是 5 的容量,但实际运行时给的是 9 个元素,这就意味着需要一次内存申请和拷贝。我就将默认的容量更改了,设置为 9 提升性能

这个更改将会在每次 WPF 启动的时候都会用到,因此本次更改虽然优化量很小,但能影响每次 WPF 应用启动

Fix the MimeObjectFactory field capacity by lindexi · Pull Request #4493 · dotnet/wpf

修复路径包含井号找不到资源

如果放在了路径包含 # 号的文件夹下,那么有些 WPF 资源将会找不到

Fix GetEntryAssemblyLocation Uri by lindexi · Pull Request #4799 · dotnet/wpf

新语法提升系列

使用 pattern matching 提升 TaskExtensions 的性能

Use pattern matching in TaskExtensions by lindexi · Pull Request #4424 · dotnet/wpf

给锁对象标记 readonly 关键词

给锁对象标记 readonly 关键字,可以减少后续编辑代码时的对锁的不安全更改

优化调试

以下是一个没有啥用的更改,在抛出 Win32Exception 时,写入更明确的信息,然而原本的代码就有写入了,因此以下更改是没有用

Add clearer win32 exception information in SplashScreen CreateWindow by lindexi · Pull Request #3923 · dotnet/wpf

单元测试

加上使用 async 的 FileStream 创建 BitmapDecoder 的测试:

Add Test case for create BitmapDecoder with async file stream. by lindexi · Pull Request #14 · dotnet/wpf-test

代码审查

https://github.com/dotnet/wpf/pull/3092#issuecomment-640955984

Add BindingFailed event for diagnostics of binding failures by spadapet · Pull Request #3505 · dotnet/wpf

[release/5.0] Support Source Generators in WPF projects by ryalanms · Pull Request #3846 · dotnet/wpf

loc updates by cristianosuzuki77 · Pull Request #3947 · dotnet/wpf

Using a stopwatch and timespan instead of DateTime and uint by batzen · Pull Request #1171 · dotnet/wpf

Update WPF to build against newest released version of the SDK (.NET 6.0 Preview1) by ryalanms · Pull Request #4123 · dotnet/wpf

Port WPF ARM64 support to NET 5: Final project, source, and packaging updates by ryalanms · Pull Request #4523 · dotnet/wpf

Tooltip by SamBent · Pull Request #4623 · dotnet/wpf

Added DRT App Threading Model by dipeshmsft · Pull Request #10 · dotnet/wpf-test

修文档注释

Fix comment typo in MarkupCompilePass2.cs by lindexi · Pull Request #4408 · dotnet/wpf

Fix comment typo in MarkupCompilePass2.cs by lindexi · Pull Request #4282 · dotnet/wpf

Fix comment typo in DragDrop.cs by lindexi · Pull Request #4249 · dotnet/wpf

Fix comment typo in DataObjectCopyingEventArgs.cs by lindexi · Pull Request #4072 · dotnet/wpf

Fix Style.cs comment by lindexi · Pull Request #4004 · dotnet/wpf

Fix Grid SetFinalSize method comment by lindexi · Pull Request #3909 · dotnet/wpf

Fix XmlNsInfo comment typo by lindexi · Pull Request #3742 · dotnet/wpf

Remove the not accessed local variable in BitmapDecoder.SetupDecoderFromUriOrStream by lindexi · Pull Request #4798 · dotnet/wpf

Fix document format by lindexi · Pull Request #4557 · dotnet/wpf

Update the testing api changes in developer-guide.md by lindexi · Pull Request #5065 · dotnet/wpf

Fix typo in RenderDataDrawingContext comment by lindexi · Pull Request #5135 · dotnet/wpf

只是修复注释的语法

Fix the comment in DefaultRestoreFocusMode property by lindexi · Pull Request #6170 · dotnet/wpf

dotnet runtime

日志库减少不必要的对象创建和静态对象

修复 MAC 下删除应用程序,然后调用 Process Start 失败

详细请看 dotnet core 在 MAC 系统下删除应用程序自己后调 Process Start 方法将会抛出 Win32 异常

Ignore the executable file be deleted in Process Start by lindexi · Pull Request #40748 · dotnet/runtime

文档

代码审查

Nullability annotations for HttpListener by pgovind

链接 Nullability annotations for HttpListener by pgovind · Pull Request #41189 · dotnet/runtime

有多余的判断逻辑,使用 s!.Length 不如使用原先拿到的 l 判断

有优化的写法,有两个小伙伴给我点赞

SourceYard

主要开发者

制作 NuGet 源代码包的工具,使用 NuGet 将源代码分发给小伙伴,可以直接安装此 NuGet 获取源代码

OpenXML SDK

水到非官方开发者了

API

Add TryGetPartById by lindexi · Pull Request #714 · OfficeDev/Open-XML-SDK

性能优化

Use Cache.ReadOnlyCollection for OpenXmlDomReader.Attributes by lindexi · Pull Request #705 · OfficeDev/Open-XML-SDK

Add Benchmark for create metadata by lindexi · Pull Request #764 · OfficeDev/Open-XML-SDK

Reduce property acquisition and repeated call methods by lindexi · Pull Request #788 · OfficeDev/Open-XML-SDK

Small performance improvements for AddNamespaceDeclaration by lindexi · Pull Request #789 · OfficeDev/Open-XML-SDK

文档

Remove unnecessary code by lindexi · Pull Request #742 · OfficeDev/Open-XML-SDK

Remove unused ElementLookup.Contains method by lindexi · Pull Request #757 · OfficeDev/Open-XML-SDK

Fix typo by lindexi · Pull Request #769 · OfficeDev/Open-XML-SDK

Fix comment typo by lindexi · Pull Request #775 · OfficeDev/Open-XML-SDK

Fix the typo in comment. by lindexi · Pull Request #785 · OfficeDev/Open-XML-SDK

Fix CopyChildren typo in OpenXmlElement.cs by lindexi · Pull Request #937 · OfficeDev/Open-XML-SDK

Fix code by lindexi · Pull Request #81 · OfficeDev/open-xml-docs

Xamarin Forms

修坑

Fix the memory leak problem of ListViewRenderer headerRenderer by lindexi · Pull Request #11699 · xamarin/Xamarin.Forms

samples

https://github.com/dotnet/samples/pull/299

https://github.com/dotnet/samples/pull/308

https://github.com/dotnet/samples/pull/516

https://github.com/dotnet/samples/pull/517

https://github.com/dotnet/samples/pull/518

https://github.com/dotnet/samples/pull/524

https://github.com/dotnet/samples/pull/539

https://github.com/dotnet/samples/pull/541

https://github.com/dotnet/samples/pull/542

https://github.com/dotnet/samples/pull/561

https://github.com/dotnet/samples/pull/602

https://github.com/dotnet/samples/pull/634

https://github.com/dotnet/samples/pull/745

Fix compile by lindexi · Pull Request #741 · dotnet/samples

Fix align by lindexi · Pull Request #654 · dotnet/samples

Fix code format by lindexi · Pull Request #696 · dotnet/samples

Fix code format by lindexi · Pull Request #854 · dotnet/samples

Environment.FailFast Method (System)

Fix code format by lindexi · Pull Request #1011 · dotnet/samples

Fix code format by lindexi · Pull Request #1065 · dotnet/samples

Assembly.GetType Method (System.Reflection)

dotnet docs

Update inheritance.md by lindexi · Pull Request #10669 · dotnet/docs

Fix typo by lindexi · Pull Request #9499 · dotnet/docs

Fix code format by lindexi · Pull Request #27745 · dotnet/docs

Fix code format by lindexi · Pull Request #27812 · dotnet/docs

Fix code format by lindexi · Pull Request #27869 · dotnet/docs

  • https://github.com/dotnet/docs/pull/27921
  • https://github.com/dotnet/docs/pull/27922
  • https://github.com/dotnet/docs/pull/27923
  • https://github.com/dotnet/docs/pull/27955
  • https://github.com/dotnet/docs/pull/27956

MicrosoftDocs win32

Fix typo in comparing-direct2d-and-gdi.md by lindexi · Pull Request #1091 · MicrosoftDocs/win32

nuget

Update nuspec.md by lindexi · Pull Request #1316 · NuGet/docs.microsoft.com-nuget

visualstudio-docs

Fix code by lindexi · Pull Request #2309 · MicrosoftDocs/visualstudio-docs

Fix code by lindexi · Pull Request #2503 · MicrosoftDocs/visualstudio-docs

winrt-api

Fix code format by lindexi · Pull Request #773 · MicrosoftDocs/winrt-api

Fix code format by lindexi · Pull Request #772 · MicrosoftDocs/winrt-api

windows-uwp

Fix align by lindexi · Pull Request #1357 · MicrosoftDocs/windows-uwp

Fix format by lindexi · Pull Request #1423 · MicrosoftDocs/windows-uwp

xamarin-docs.zh-cn

HandyControl

Improve Deque initialization performance by lindexi · Pull Request #435 · HandyOrg/HandyControl

Add InputClickHelper by lindexi · Pull Request #414 · HandyOrg/HandyControl

Make the locker as readonly by lindexi · Pull Request #413 · HandyOrg/HandyControl

Use const replace magic number by lindexi · Pull Request #412 · HandyOrg/HandyControl

加上给 Grid 行列命名绑定的辅助方法 by lindexi · Pull Request #770 · HandyOrg/HandyControl

Avalonia

Fix 1533 Avoid throwing exception in TryReadDouble by lindexi · Pull Request #1534 · AvaloniaUI/Avalonia

Improve tiny performance by lindexi · Pull Request #1472 · AvaloniaUI/Avalonia

Dispatcher’s InvokeAsync check action is null #1400 by lindexi · Pull Request #1401 · AvaloniaUI/Avalonia

add some comment by lindexi · Pull Request #1396 · AvaloniaUI/Avalonia

JasonStein Notepads

Added zh-CN translation by lindexi · Pull Request #32 · JasonStein/Notepads

Orleans.MultiClient

https://github.com/OrleansContrib/Orleans.MultiClient/pull/3

Castle.Core

Update date by lindexi · Pull Request #523 · castleproject/Core

NewLife.RocketMQ

文档

加上 PackageProjectUrl 链接 by lindexi · Pull Request #14 · NewLifeX/NewLife.RocketMQ

MultiTouchVista

Format doc by lindexi · Pull Request #2 · nesherhh/MultiTouchVista

Format doc by lindexi · Pull Request #1 · nesherhh/MultiTouchVista

JitBench

Fix the link by lindexi · Pull Request #93 · aspnet/JitBench

dotnet iot

代码审查 Fixing DHT issues, adding and adjusting documentation by Ellerbach · Pull Request #1164 · dotnet/iot

鸿蒙的文档

相机开发 示例开发2 链接失效 · Issue #I1UW33 · OpenHarmony/docs - Gitee.com

Silk.NET

报告问题和提出解决方法

DirectX fatal error on almost every method on x86 · Issue #731 · dotnet/Silk.NET

代码审查

Project Templates for Windowing, OpenGL by ThomasMiz · Pull Request #748 · dotnet/Silk.NET


本文会经常更新,请阅读原文: https://blog.lindexi.com/post/%E5%BC%80%E6%BA%90%E5%AE%9E%E6%88%98.html ,以避免陈旧错误知识的误导,同时有更好的阅读体验。

如果你想持续阅读我的最新博客,请点击 RSS 订阅,推荐使用RSS Stalker订阅博客,或者前往 CSDN 关注我的主页

知识共享许可协议 本作品采用 知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议 进行许可。欢迎转载、使用、重新发布,但务必保留文章署名林德熙(包含链接: https://blog.lindexi.com ),不得用于商业目的,基于本文修改后的作品务必以相同的许可发布。如有任何疑问,请 与我联系

无盈利,不卖课,做纯粹的技术博客

以下是广告时间

推荐关注 Edi.Wang 的公众号

欢迎进入 Eleven 老师组建的 .NET 社区

以上广告全是友情推广,无盈利