Firstly, I personally don’t need this capability. I’m addressing part of the feasibility issue, just because I happened to have just been dealing with QLStephen due to a Catalina upgrade.
Spawning processes in Unix is not exactly a cheap operation, BTW.
I was just writing Python
multiprocessing code yesterday, spawning and forking processes. I’m aware of the overheads. For this kind of thing, they are trivial compared to GUI interactions and the timescales that matter to users viewing a file.
I just had a look at the QLStephen code. I only briefly looked at it, but it appears to mainly rely on Cocoa code interrogating existing MIME type file attributes.
I just re-installed QLStephen on my Mac with a new Catalina installation, and it works fine (I should repeat that the issue tracker indicates the Catalina build won’t run under Big Sur). As before, QuickLook display of plain text files is perceptually instantaneous. For example, in a code repo I’m currently working in, there’s a README file with no extension. Before installing QLStephen, QuickLook wouldn’t display it. Now it displays it instantaneously. QLStephen is doing work to build a thumbnail to display, and it’s still essentially instantaneous from a user’s perspective.
The point is that this is doable (at least through Catalina), if a developer wants to do it.
An interesting question for this thread is: If a user has installed a QuickLook extension, will DT use it for displaying files? For all I know, if it’s using the system’s QL capability behind-the-scenes, it would automatically do so without any work on the part of DT devs. If so, then QLStephen may be a solution to the problem (except for Big Sur, for now).
PS: As a caveat, I’ve played around further with exercising QLStephen. It catches some things that are displayable as text files, but not all. E.g., the repo I’m working in has some plain-text files with numerical data in files with a .sed suffix (“Spectral Energy Distribution”, nothing to do with the Linux
sed utility!). Although they’re plain text, QLStephen isn’t displaying them. Maybe it depends on a MIME type being set elsewhere, or maybe .sed is registered for some app not providing QL capability.