3 ms·
I certainly could have made it persistent but then I'd be adding significant complexity to a little run-and-done single-file data processing app. I mean, even b
by zrail 17y ago
I certainly could have made it persistent but then I'd be adding significant complexity to a little run-and-done single-file data processing app. I mean, even before changing to Mouse the thing took only a few seconds to start up. Now it's less than half a second.
(Also, SSDs cost money :))
- jrockway 17y agoThe "just rewrite your app to use a different object system" doesn't scale very well, but App::Persistent has a constant per-app overhead -- deciding what code to run in the server, and deciding what code to run per-client. (It's not automatic because the "omg magic" is what made pperl unusable.) The persistent version of Devel::REPL, for example, is just a few lines of code: http://github.com/jrockway/app-persistent/blob/master/repl.pl http://github.com/jrockway/app-persistent/blob/master/repl.p... And if you use MooseX::Runnable, it is automatic. (Just load with +Persistent.)
- zrail 17y agoIt wasn't a different object system, though. At the level I'm using Moose, Mouse was completely drop-in. I understand your point, but scaling isn't really a goal. I just wanted the script to run faster than it was. I'm planning on building some persistent stuff at work and I'll definitely give App::Persistent a closer look when the time comes, but for a little script it's sort of overkill.
- jrockway 17y agoWhy even use objects, then? Why not just use a hashref with key/value pairs? That's like 8 percent faster, and definitely not overkill!