How Photoshop solved working with files larger than can fit into memory
developer.chrome.com
developer.chrome.com
It doesn't really go into the guts of how PS actually manages all that data in much detail. Just "it goes to the filesystem in a smart way."
[1] The "origin private file system": https://developer.chrome.com/articles/file-system-access/#ac...
Like, uh.... ok, you do that, good luck.
Browsers do it too. It's possible to do multiple GB an hour doing nothing on some versions with extensions, just from writing and rewriting the same file every minute for probably no good reason other than a dev hated complexity too much to check for unnecessary writes and not wear out the SSD.
But in this case, the use-case for using a ramdisk for a PS scratch disk came from using an A23-aware patched version of System 5.x/6.x with a version of Photoshop that was not A23 aware. AFAIK This was a VERY tiny window around PS1.0 and possibly PS2.0, by the time of PowerPC and System 7.5+ (which this user had), there was very definitely absolutely no advantage to partitioning the RAM away from programs.
At a guess, someone had told them to do it this way in the era of the early Mac IIs and such, but they hadn't grasped the 'why'
One interesting thing about Photoshop's perspective is that it's fundamentally about "files", which is like a single bytestream that contains all the picture and which must be transferred to the browser to work on. A Figma document also can refer to images, but in a different way. The sum of the document data (like layout) and the image pixels can be extremely large, like gigabytes, but you can transfer those two things separately from server to client.
“ The amount of memory also varies from device to device, as you know when you order a new computer or device and specify the amount of Random-Access Memory (RAM) desired. Many of these platforms also support virtual memory, which allows an application to use more memory than is physically available.”
Adobe likely owns the xRes intellectual property, though:
> Adobe likely owns the xRes intellectual property, though:
Photoshop has used scratch files and it's own virtual memory system since long before adobe bought macromedia
128MB would be unlikely, but the SE/30 was released in January of the same year.
Here's a gallery (sadly, thumbnails only): https://web.archive.org/web/20070813084252/http://www.animat...
And the original of this page showed how it was possible to zoom into an apparent bitmap image to an incredible degree (demonstrating the vector resolution-independence of Satori): https://web.archive.org/web/20070804225012/http://www.animat... [As far as I recall, it zoomed into the writing on the clipboard on the right, to show a single period!]
Incredible software!
Desktop photoshop also had the ability to work with files too large for ram in the 90s
Starting with 32bit had some performance advantages because 64bit runtimes can use virtual memory shenanigans to implement bounds checking with zero overhead. In wasm64 they'll have to do explicit bounds checking instead.
Did you mean 32bit?
I think the wasm spec would have to be amended for that to be legal though, currently out-of-bounds memory accesses must throw an exception one way or another, and silently dropping the high bits of addresses may turn an out-of-bounds access into an in-bounds access that doesn't throw.
The wasm runtime and other browser code runs in the same address space but must stay out of reach of the wasm code.
Now git off mah lawn ya greenhorns. :V
[1]: https://helpx.adobe.com/photoshop/using/scratch-disks-prefer...
The PS.temp file is a special file created by the Adobe Photoshop program to implement the program's virtual memory scheme. Virtual memory allows you to work on images of nearly any size, by using a hard disk instead of RAM (random-access memory) to hold information. The PS.temp file contains the program's virtual memory information. The file is normally deleted when you quit the program.
For implementation details, see the files UVMemory.p and UVMemory.inc1.p in the source distribution[2].
[1] https://archive.computerhistory.org/resources/access/text/20...
[2] https://computerhistory.org/blog/adobe-photoshop-source-code...
It's very similar to VM. We paged and indexed everything.
The application should be giving hints, and then the OS deciding what to load and when.
Not that there wouldn’t have been alternatives had web apps not become a thing. It’s just more user-friendly than most current open alternatives (eg apt-get), and more open than most current user-friendly alternatives (eg app stores).