null54 Posted October 25, 2020 Share Posted October 25, 2020 Is there a recommend method for utilizing the ArrayPool<T> class in a plugin? My AvifFileType plugin creates a lot of short-lived byte arrays that would benefit from being pooled. Currently I am using a private ArrayPool that is based on the .NET Core 2.2 source code. I see that Paint.NET has an ArrayPoolBuffer class in PaintDotNet.Base.dll, is that available/supported for use by plugins? Quote Plugin Pack | PSFilterPdn | Content Aware Fill | G'MIC | Paint Shop Pro Filetype | RAW Filetype | WebP Filetype The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait Link to comment Share on other sites More sharing options...
Rick Brewster Posted October 25, 2020 Share Posted October 25, 2020 I should add an ArrayPoolService via the AppModel interfaces. Then you can easily use that, and I can eventually sandbox and do cleanup if so that if a plugin requests a bunch of buffers that aren't used elsewhere. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.