Alias file size suddenly increased

Hi, I have searched to see whether this issue has come up in the past, but cannot find anything.

My main Scrivener project has a lot of alias files, linked to .pdfs that are stored in a separate folder. Before yesterday, these aliases were generally about 800kb, but yesterday they increased in size, and I cannot work out why (most are now 2.1mb, others 1.4mb). This has increased the size of my .scriv from just over 100mb to 265mb, which means that the backups take longer. I noticed when I unpaused Dropbox and it began updating over 100 files (usually it updates round 20 (the ones I’ve modified during that session)). So, I’m not sure whether this was caused by Mavericks, Scrivener 2.5, or Dropbox.

If anyone can shed light on this it would be much appreciated. As far as I can tell, nothing has been modified within Scrivener (the aliases link to the pdfs correctly), but the increase in size is slightly concerning as this is a PhD project that I’ll be working on for another couple of years and I used aliases mainly to keep the file size low. In the meantime, I’ve reverted to one of my backups.

Scrivener doesn’t tough read-only files like aliases, so if they were smaller before, it won’t be something Scrivener has done. (It reads from such files but never, ever writes over them or updates them.) Could it be that you had zipped up and unzipped the project at all? Aliases don’t always work well when zipped up and extracted (for this reason, when creating backup zip files, Scrivener uses the ditto utility rather than the zip utility for archiving projects that have aliases in them).

All the best,
Keith

Thanks for your reply Keith. They haven’t been zipped (except for the backups that Scrivener creates). It is useful to know that Scrivener doesn’t touch the aliases, though.

I suspect that the OS modified them. Occasionally I view the package contents of the project, mainly because I work on two computers and I’m paranoid that Dropbox hasn’t synched the files correctly. I’ve never opened an alias through the finder, but have used quick look on them (I can’t remember if I did so yesterday, before they increased in size). I wonder whether quick look modifies the file in some way – even if it does, I’m not sure how viewing one via quick look could increase the size of all the alias files in that folder.

Aliases created by the Cocoa system or Finder definitely do seem a bit wonky in 10.8–9. The problem appears to be that they are storing an inefficient amount of preview data in the alias itself, rather than allowing that preview data to be piped from the original file, where it would make more sense to store a massive icon and maybe some Quick Look data. Why roughly 2mb of preview garbage needs to be in the pointer is beyond me—but that’s what you get when you create an alias now, and maybe even as you suggest, do so much as look at it with Quick Look. I couldn’t confirm that because I do not have any legacy aliases pointing to files that have Quick Look preview data.

You can shave a little off by deleting the icon from the preview in Finder. Just Cmd-I on the alias to Get Info, click on the icon in the top-left and hit the delete key. For me, that dropped it from 1.9mb to 1.3mb, so it’s probably not worth the hassle to do that unless you have thousands (and then you would want to find a more efficient way to strip icon data).

Effectively, it means the alias is no longer a useful tool for one of its original purposes: a small pointer file sitting as a proxy for a larger file. For anything smaller than 2mb, you might as well just fully import it.

I could suggest you could use symbolic links[size=80][1][/size], but that wouldn’t help you with Dropbox. Dropbox is designed to use a symbolic link in such a way that it will still upload the original data (this way you can sync stuff that isn’t actually in the Dropbox folder; it’s a neat trick, but it foils using them as a small profile alternative to aliases).

Is Dropbox just for backup purposes? If so you could consider just pointing your Scrivener automatic backup folder to Dropbox with zip compression turned on, and keeping the project outside of external manipulation. That would dodge the sym link problem, but also, I would also be a bit nervous about using aliases in conjunction with any kind of synchronisation service. Aliases are an older technology, and a chunk of what they are is special data stored in the “resource fork”, which is a concept that doesn’t exist outside of the Mac. Thus the Dropbox version of the alias is much smaller (if you view them off of a Mac, like using their website, you’ll see they are more like 640kb). If you ever had to restore from Dropbox, you may end up with non-functional aliases.

[size=150]Solutions[/size]

So in a neat summary without all of the technical exposition, your options are:

  1. Just live with it. If on the average your PDF files are greater than 2mb then you’re still saving a little space.
  2. Don’t use aliases and just use PDFs. This will be the better option if your average PDF file is smaller.
  3. Use another tool to create aliases. I know for example that Path Finder uses the older method for creating them. They will only be a few hundred kilobytes. Import them into Scrivener’s Binder after creating them.
  4. Use symbolic links. There is a helper called Symbolic Linker that should do fine[size=80][2][/size]. Likewise, drag these into the Binder to import them.
  5. Recommended: no matter what you do, I would recommend not hosting files that depend upon any special Mac technology, like aliases, on Dropbox. It will work fine on your computer, to be clear, but if you ever have to actually use Dropbox, for example to restore your data to a crashed computer, all of those aliases will be rendered inert (and likewise, version tracking, tagging, comments and scattered other things).

Notes:[size=80]

  1. You can create a symbolic link to a file, and then drag the symlink into Scrivener to import it. It will look like a fully imported PDF file in the Binder (no little arrow), but if you check your disk you should see it is only a few bytes.

  2. This will install a service, contextual to file selections in Finder. I would suggest you add a keyboard shortcut to it, but that also appears to be broken in 10.9, at least on my system.

[/size]

Thanks for the thorough explanation. I’m now quite glad that this happened, as I’m aware of the dangers of using aliases with Dropbox. I’m using DB so that I can work on two different computers, and haven’t had any problems storing the live version there so far. However, I haven’t actually restored my project from the DB website yet. So, from what you’ve said, I’d probably be best off working from the most recent (zipped) backup, having copied it to a local folder. Are there any downsides to this approach that I should be aware of (aside from the slightly more complex workflow)?

Many of the pdfs that I’ve linked to with an alias are now smaller than the alias itself. I’m sorely tempted to replace each alias in my project with the pdf, but that will be a lot of work particularly as there are often notes and links attached.

Yes there is also the drawback that you are uploading a new full copy of the project each time, rather than modifying only the parts that have changed. So it will use more bandwidth and Dropbox storage space. Switching to symbolic links would probably dramatically reduce your project size, though like you say it would be a pain to fix the existing problem with large aliases.

Otherwise it’s a pretty solid method. I’ve been using it myself for years.

I don’t mean to overstate the problem. It is a risk, but if you have other backups that are Mac-friendly, like Time Machine or even just carbon copied drives, you could be okay. I only meant to stress that depending on Dropbox (or any similar service to my knowledge) as your main and potentially only backup with Mac-specific file technology is risky.

Good catch though! I’m not sure if there is anything we can do to resolve this new problem, but it is good to know that the more modern OS versions have a decidedly different philosophy on just what an alias should be (honestly, I have a hard time believing this is not an Apple bug).

I’m quite obsessive about keeping backups (as I’m sure most people here are), so I’m not too concerned about that. But there’s just something about having the live version in DB that I’m not happy about. Perhaps it’s that I don’t fully trust DB, and there’s a lot of fiddling around (for example pausing the sync whilst working on the project) that relies on my memory. Anyway, knowing that the aliases don’t work well with DB has pretty much convinced me to try the other method, I think.

Thanks again for your help – it’s a shame Apple doesn’t take a leaf out of the Scrivener book when it comes to product updates.