Skip to content

Conversation

@Sergio0694
Copy link
Member

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following matches the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

This PR reintroduces the single-row value delegates for pixel processors. It includes two new APIs for the ParallelHelper class, so that individual processor can choose whether to iterate over single rows or over row intervals, depending on their needs, so that it's possible to find the best possible balance between performance and code clarity.

Opening this not as a draft PR just to have the CI run on it, but this is NOT READY TO MERGE.

@Sergio0694 Sergio0694 added this to the 1.0.0 milestone Feb 27, 2020
@Sergio0694 Sergio0694 self-assigned this Feb 27, 2020
@Sergio0694
Copy link
Member Author

Sergio0694 commented Mar 3, 2020

@antonfirsov Mmmh, getting a very nice System.AccessViolationException on .NET472, that's weird considering that the tests seem to be running fine on .NET Core 3.1 and 2.1 🤔

EDIT: all tests are passing just fine locally, I've bumped the CI.

@antonfirsov
Copy link
Member

antonfirsov commented Mar 4, 2020

AccessViolationException worries me, might indicate a sporadic memory corruption bug. Do we have any data where did it happen?

Can you run stress it a bit locally against net472? A PS script like this might do the job:

for($i = 0; $i -lt 5; $i++)
{
    dotnet xunit -c Release --no-build -f net472
}

for($i = 0; $i -lt 5; $i++)
{
    dotnet xunit -c Release --no-build -f net472 -x86
}

@JimBobSquarePants
Copy link
Member

JimBobSquarePants commented Mar 4, 2020

@Sergio0694 What is the stack trace for that exception? I have a rich history of chasing them down in the jpeg decoder so I may prove useful.

@Sergio0694
Copy link
Member Author

@JimBobSquarePants Ah crap, it was somewhere in the ResizeProcessor<TPixel> tests I think, but I restarted the CI yesterday and the logs are gone, is there a way to get them back somehow? 😟

@JimBobSquarePants
Copy link
Member

JimBobSquarePants commented Mar 4, 2020

@Sergio0694 I had a look through the list of actions and I can't find anything other than the CoreFlags issues which have been fixed.

https://github.com/SixLabors/ImageSharp/actions/runs/46311348

I've also thoroughly reviewed the code and there are no changes that you have made that could cause the introduction of an AccessViolationException. I'm approving this.

@JimBobSquarePants JimBobSquarePants merged commit a9e10e2 into master Mar 4, 2020
@JimBobSquarePants JimBobSquarePants deleted the feature/single-row-value-delegate-optin branch March 4, 2020 12:34
@Sergio0694
Copy link
Member Author

@JimBobSquarePants Sounds great, awesome! 😄 🚀
Also glad to hear I didn't accidentally mess anything up then ahahahah

@JimBobSquarePants JimBobSquarePants modified the milestones: 1.0.0, 1.0.0-rc1 Apr 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants