Sunday, September 02

Geek

That... Actually Worked Part Deux

It's far from a comprehensive test, but I spent today cleaning up the Minx codebase, moving from Python 2.6 to PyPy 2.7 [Yeah, I know, but I'm not going to get it moved over to 3.7 in one Sunday afternoon] on a completely clean platform - took the code, cleaned it up, and redeployed rather than copying the existing installation - and it works.

https://ai.mee.nu/images/UnfamilarPagePart22.JPG?size=720x&q=95

And it's pretty quick:
95kb generated in CPU 0.0128, elapsed 0.0214 seconds.
13 queries taking 0.0121 seconds, 24 records returned.
Powered by Minx 1.1.7-kiyone.

Elapsed time is a little longer than the old build:
96kb generated in CPU 0.01, elapsed 0.0157 seconds.
13 queries taking 0.0103 seconds, 24 records returned.
Powered by Minx 1.1.6c-pink.

[Slight size difference is due to the rotating Doctor Who quotes.]

Which may come down to using PyMySQL in place of MySQLdb - a pure Python library instead of a C wrapper.  Or...  I'm running the local copy on disk, not SSD, for the moment.  Almost everything would be cached, but only almost.  That will be fixed soon.  And by "fixed" I mean when the PayPal clears I'm going to buy about 4TB of SSD.

This port - once I finish testing - means I can easily deploy onto Ubuntu 18.04 or whatever, rather than needing CentOS and OpenVZ.  Not that there's anything wrong with CentOS; it's actually caused far less fuss in this process than Ubuntu and I would have saved three weekends of messing around if I'd just gone straight there instead of trying to use the latest flashy toys.

Update: The dashboard works, commenting works, editing works.  Images work, including the fancy resizing and recompression stuff.  I need to get a dedicated SSL certificate or two, though, because some stuff I've switched over to use automated SSL breaks when I point it at the local server, making it hard to test properly.  Hey, wildcard certs are cheap right now.  Or free, for that matter.

Posted by: Pixy Misa at 09:43 PM | Comments (2) | Add Comment | Trackbacks (Suck)
Post contains 301 words, total size 3 kb.

1 The biggest selling point of 2.7 is, one can write code in it that is compatible with 3.5. In theory, at least. In practice, it can be extremely difficult to root out the old assumptions.

Posted by: Pete Zaitcev at Monday, September 03 2018 05:11 AM (LZ7Bg)

2 Yes, that's what I'm doing with all my new code.  You need to be careful designing tests, though, because at some point the string / Unicode changes will bite you no matter how careful you are.

Posted by: Pixy Misa at Monday, September 03 2018 01:06 PM (PiXy!)

Hide Comments | Add Comment




Apple pies are delicious. But never mind apple pies. What colour is a green orange?




50kb generated in CPU 0.0139, elapsed 0.1283 seconds.
58 queries taking 0.1189 seconds, 342 records returned.
Powered by Minx 1.1.6c-pink.