KOffice – TDE office suite
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.9 KiB

  1. One think Chalk can not handle are really big files. A 125MB tif file is
  2. loading into memory in one go, making Chalk take about 289MB of memory
  3. -- with no image loaded, Chalk takes a more reasonable 41MB. And during
  4. loading, Chalk needs 800MB, and that's a bit much.
  5. Since my employer has paid to upgrade my laptop to 1GB of memory, that's
  6. not a problem for me :-). But it's the principle of the thing. Besides,
  7. loading the file does take a few minutes to convert. And you don't want
  8. to do a quick sharpen on a file of this size.
  9. Now it has never been a design goal to handle really enormous images, vips
  10. does that a lot better than any general purpose paint app can ever aspire
  11. to, but we should give some thought to our way of handling big images.
  12. The problem is layered: it's not enough to have lazy loading of chalk
  13. files (although we should store, when an image gets above a certain
  14. size, an .png file of the rendered image that we can quickly load and
  15. display, and then we should only load the tiles we actually need for
  16. editing/rerendering from the file), but we should also be able to do the
  17. same with tiled tiffs and exr images that support random access loading.
  18. This must be done somewhere in the datamanager code. If an image reader
  19. (whether it's a filter or Chalk's own file format reader) indicates that
  20. it supports random access, then a file handle and a the reader object
  21. is passed to the tile manager.
  22. The tile manager either does nothing until it gets a request for a
  23. certain chunk of data (through one of the read functions or the creation
  24. of an read/write iterator), and only then it starts reading and decoding
  25. image data. Or, the tile manager starts a background thread and begins
  26. converting the alien image data to Chalk tiles, carefully caching them
  27. in a temp file.
  28. Maybe we could even devise an algorithm to delete unused tiles from
  29. memory and cache them on disk; same with undo information.