question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DZSave massive increase in memory usage in netvips.native.win-x64 8.11 vs 8.8

See original GitHub issue

When using different versions I am seeing massive memory differences when using DZSave against an image made of multiple tiles. In this case ~1000 4 band pngs at 2117 x 2048 netvips.native.win-x64 8.11 uses about 7gb of memory where as 8.8 uses less than 2gb.
It’s worth noting that 8.11 also seems to be about 25% faster so I suspect some optimisation has occurred.

  NetVips.NetVips.Concurrency = 2;
  Environment.SetEnvironmentVariable("VIPS_DISC_THRESHOLD", "10m");
  Cache.Max = 0;

  var tiles = new List<Image>();

  foreach(var path in vipsImageRepo.imageFilePaths)
  {
      var page = Image.NewFromFile(path, access: Enums.Access.Random, memory: false);
      tiles.Add(page);
  }

  var result = Image.Arrayjoin(tiles.ToArray(), shim: 0, vspacing: 0, across: 1, valign: Enums.Align.Low );
  result.Dzsave(outputPath, tileSize: 800, depth: Enums.ForeignDzDepth.One, suffix: ".jpg[Q=95]", container: Enums.ForeignDzContainer.Fs);

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:35 (31 by maintainers)

github_iconTop GitHub Comments

1reaction
jcupittcommented, Sep 14, 2021

It’s going to be a feature in 8.12, so perhaps before Christmas?

You can build the head of git master now if you’d like to try it out.

0reactions
kleisaukecommented, Dec 2, 2021

NetVips.Native v8.12.1 is now available.

Read more comments on GitHub >

github_iconTop Results From Across the Web

net-vips
I'm trying to use libvips using net-vips I have gotten libvips to work on Mac ... DZSave massive increase in memory usage in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found