Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup & optimize performance of IO (switch to libspng) #57

Merged
merged 14 commits into from
Dec 16, 2021
Merged
5 changes: 5 additions & 0 deletions .ci/build-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ jobs:
continueOnError: true
condition: and(eq(variables['AGENT.OS'], 'Windows_NT'), and(eq(variables['Build.Reason'], 'PullRequest'), and(succeeded(), ne(variables['Build.SourceBranch'], variables['System.PullRequest.TargetBranch']))))
displayName: "Print tar help"
# https://github.com/esy/pesy/commit/3aeaad2550edcf4ac8e259400279a564a92a194e
- powershell: Write-Host "##vso[task.setvariable variable=HOME;]D:\"
continueOnError: true
condition: eq(variables['AGENT.OS'], 'Windows_NT')
displayName: "Make sure $HOME is same is Agent.BuildDirectory"
- bash: |
# COMPUTE THE ESY INSTALL CACHE LOCATION AHEAD OF TIME
DESIRED_LEN="86"
Expand Down
2 changes: 1 addition & 1 deletion .ci/utils/use-esy.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# steps to install esy globally

steps:
- script: "npm install -g @esy-nightly/esy"
- script: "npm install -g esy"
displayName: "install esy"
9 changes: 3 additions & 6 deletions bin/Main.re
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
open Odiff.ImageIO;
open Odiff.Diff;

let getIOModule = (filename, ~antialiasing) =>
let getIOModule = filename =>
Filename.extension(filename)
|> (
fun
| ".png" when antialiasing => (
(module ODiffIO.Png.BigarrayIO): (module ImageIO)
)
| ".png" => ((module ODiffIO.Png.IO): (module ImageIO))
| ".jpg"
| ".jpeg" => ((module ODiffIO.Jpg.IO): (module ImageIO))
Expand All @@ -34,8 +31,8 @@ let main =
antialiasing,
ignoreRegions,
) => {
module IO1 = (val getIOModule(img1Path, ~antialiasing));
module IO2 = (val getIOModule(img2Path, ~antialiasing));
module IO1 = (val getIOModule(img1Path));
module IO2 = (val getIOModule(img2Path));

module Diff = MakeDiff(IO1, IO2);

Expand Down
Loading