本文记录我参与的开源项目
收到的表扬
WPF
水到官方开发者了
上图,在 .NET 7 的博客
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
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
What’s new for WPF in .NET 7 - .NET Blog
优化启动性能 使用调用方法代替反射
预计能提升 0.0001 纳秒的启动性能
优化橡皮擦性能
优化橡皮擦百分之二十的性能,通过缓存预先计算提升性能
Using Per-computed bounds in ErasingStroke by lindexi · Pull Request #4111 · dotnet/wpf
XAML 创建对象性能优化
最多可以提升3倍的 XAML 创建对象性能
笔迹性能优化
使用 readonly 方法,可以减少 WPF 方法调用的时候,拷贝结构体,可以提升笔迹的性能
Using readonly struct in WPF Ink module by lindexi · Pull Request #3908 · dotnet/wpf
Replace the Dictionary with HashSet in AppDomainShutdownMonitor
替换字典为 HashSet 用于减少内存和提升一点性能,详细请看性能测试
Reduce memory usage by Array.Empty
使用 Array.Empty 可以减少内存分配,和提升创建对象的性能
Reduce memory usage by Array.Empty by lindexi · Pull Request #3085 · dotnet/wpf
使用 Array.Copy 提升 StylusPointCollection 数组拷贝性能
可以提升触摸时的触摸数据转发的性能,只要是碰到触摸,就可以用到此提升
数组池优化
给 RenderData 使用上数组池,可以让一切元素渲染时,也许可以减少一点点数组申请。此更改不一定都是正向的,因为会让数组池数组耗尽,本更改的释放是不包括 RenderData 释放时的处理
Using ArrayPool in RenderData by lindexi · Pull Request #5392 · dotnet/wpf
基础数学判断性能优化
这是在许多地方都使用的判断值是否比零足够大的数学判断逻辑,原先的判断是先判断大于零再判断不接近零。优化后是通过将原先的数学公式带入零进行简化,从而可以提升性能
Adding GreaterThanZero to DoubleUtil.cs by lindexi · Pull Request #5571 · dotnet/wpf
Remove unused local variable ‘selfStyle’ and related conditionals in System.Windows.StyleHelper.GetThemeStyle
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 时,写入更明确的信息,然而原本的代码就有写入了,因此以下更改是没有用
单元测试
加上使用 async 的 FileStream 创建 BitmapDecoder 的测试:
代码审查
https://github.com/dotnet/wpf/pull/3092#issuecomment-640955984
loc updates by cristianosuzuki77 · Pull Request #3947 · 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
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
Fix document format by lindexi · Pull Request #6773 · dotnet/wpf
Add comment to Wpf.Cpp.props code by lindexi · Pull Request #6774 · dotnet/wpf
dotnet runtime
- Add logger to cache entry to catch exception by lindexi · Pull Request #37292 · dotnet/runtime
- Use Array.Empty in CompositeFileProvider by lindexi · Pull Request #38086 · dotnet/runtime
日志库减少不必要的对象创建和静态对象
修复 MAC 下删除应用程序,然后调用 Process Start 失败
详细请看 dotnet core 在 MAC 系统下删除应用程序自己后调 Process Start 方法将会抛出 Win32 异常
文档
- Set memory cache logger field as readonly by lindexi · Pull Request #37289 · dotnet/runtime
- Fix comment in XmlStreamConfigurationProvider by lindexi · Pull Request #38084 · dotnet/runtime
- Fix comment by lindexi · Pull Request #38322 · dotnet/runtime
- Fix link in covariant-return-methods.md by lindexi · Pull Request #49356 · 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
性能优化
Add Benchmark for create metadata by lindexi · Pull Request #764 · 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
修坑
表扬
Xamarin 文档新增内容 - Xamarin - Microsoft Learn
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
Fix naming rules in dynamic2.cs by lindexi · Pull Request #33174 · dotnet/docs
Add linux-loongarch64 to rid-catalog.md by lindexi · Pull Request #43441 · dotnet/docs
dotnet API docs
- https://github.com/dotnet/dotnet-api-docs/pull/7963
- https://github.com/dotnet/dotnet-api-docs/pull/7950
- https://github.com/dotnet/dotnet-api-docs/pull/3344
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
- Update database.md by lindexi · Pull Request #73 · MicrosoftDocs/xamarin-docs.zh-cn
- Update styling.md by lindexi · Pull Request #74 · MicrosoftDocs/xamarin-docs.zh-cn
- Update deepdive.md by lindexi · Pull Request #75 · MicrosoftDocs/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
Improve tiny performance by lindexi · Pull Request #1472 · 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
obfuscar
这是一个混淆库
Microsoft.Maui.Graphics
Fix SharpDx Wpf compile by lindexi · Pull Request #452 · dotnet/Microsoft.Maui.Graphics
SkiaSharp
文档
Update SKBitmap.xml by lindexi · Pull Request #34 · mono/SkiaSharp-API-docs
UNO
chore: Fix comment in CornerRadius by lindexi · Pull Request #13594 · unoplatform/uno
feat(GTK Window): Extend into Title Bar by lindexi · Pull Request #13597 · unoplatform/uno
Five is for 5X productivity. Announcing Uno Platform 5.0
文档
chore: Fix comment typo in RootScale by lindexi · Pull Request #16890 · unoplatform/uno
docs: Update localization.md by lindexi · Pull Request #16763 · unoplatform/uno
代码审查
本文会经常更新,请阅读原文: https://blog.lindexi.com/post/%E5%BC%80%E6%BA%90%E5%AE%9E%E6%88%98.html ,以避免陈旧错误知识的误导,同时有更好的阅读体验。
如果你想持续阅读我的最新博客,请点击 RSS 订阅,推荐使用RSS Stalker订阅博客,或者收藏我的博客导航
本作品采用 知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议 进行许可。欢迎转载、使用、重新发布,但务必保留文章署名林德熙(包含链接: https://blog.lindexi.com ),不得用于商业目的,基于本文修改后的作品务必以相同的许可发布。如有任何疑问,请 与我联系 。
无盈利,不卖课,做纯粹的技术博客
以下是广告时间
推荐关注 Edi.Wang 的公众号
欢迎进入 Eleven 老师组建的 .NET 社区
以上广告全是友情推广,无盈利