1
0
Fork 0
forked from OpenNeo/impress
impress/app/models
Matchu 96998643b5 Add manifest_url to swf_assets table
Ok so, impress-2020 guesses the manifest URL every time based on common
URL patterns. But the right way to do this is to read it from the
modeling data! But also, we don't have a great way to get the modeling
data directly. (Though as I write this, I guess we do have that
auto-modeling trick we use in the DTI 2020 codebase, I wonder if that
could work for this too?)

So anyway, in this change, we update the modeling code to save the
manifest URL, and also the migration includes a big block that attempts
to run impress-2020's manifest-guessing logic for every asset and save
the result!

It's uhh. Not fast. It runs at about 1 asset per second (a lot of these
aren't cache hits), and sometimes stalls out. And we have >600k assets,
so the estimated wall time is uhh. Seven days?

I think there's something we could do here around like, concurrent
execution? Though tbqh with the nature of the slowness being seemingly
about hitting the slow underlying images.neopets.com server, I don't
actually have a lot of faith that concurrency would actually be faster?

I also think it could be sensible to like… extract this from the
migration, and run it as a script to infer missing manifest URLs. That
would be easier to run in chunks and resume if something goes wrong.
Cuz like, I think my reasoning here was that backfilling this data was
part of the migration process… but the thing is, this migration can't
reliably get a manifest for everything (both cuz it depends on an
external service and cuz not everything has one), so it's a perfectly
valid migration to just leave the column as null for all the rows to
start, and fill this in later. I wish I'd written it like that!

But anyway, I'm just running this for now, and taking a break for the
night. Maybe later I'll come around and extract this into a separate
task to just try this on all assets missing manifests instead!
2023-11-09 21:42:51 -08:00
..
item Delete unused item proxy class 2023-10-25 12:55:30 -07:00
application_record.rb Upgrade to Rails 5.2.8.1 2023-10-23 19:05:05 -07:00
auth_record.rb Add AuthUser model, connecting to openneo_id db 2023-10-23 19:05:07 -07:00
auth_user.rb Clarify the error behavior on AuthUser syncing 2023-10-23 19:05:08 -07:00
campaign.rb Upgrade to Rails 5.2.8.1 2023-10-23 19:05:05 -07:00
closet_hanger.rb Do preloading manually on user list pages, to reduce memory usage 2023-10-27 19:42:02 -07:00
closet_list.rb Do preloading manually on user list pages, to reduce memory usage 2023-10-27 19:42:02 -07:00
closet_visibility.rb Cache trade info on items#show, finally! I think it's the performance culprit. 2013-12-27 14:49:46 -05:00
color.rb Remove sanitize_sql_like monkey-patch 2023-10-23 19:05:07 -07:00
contribution.rb Upgrade to Rails 5.2.8.1 2023-10-23 19:05:05 -07:00
donation.rb Mark some more relationships as optional 2023-10-23 19:05:07 -07:00
donation_feature.rb Mark some more relationships as optional 2023-10-23 19:05:07 -07:00
fragment_localization.rb i18n for outfits#new (and layouts#application), including caching 2013-01-09 17:15:23 -06:00
image.rb Delete Camo references & Addressable gem 2023-10-23 19:05:05 -07:00
item.rb Fix old .scoped -> .all Rails upgrade bug 2023-11-09 21:35:42 -08:00
item_outfit_relationship.rb Upgrade to Rails 5.2.8.1 2023-10-23 19:05:05 -07:00
neopets_connection.rb Upgrade to Rails 5.2.8.1 2023-10-23 19:05:05 -07:00
neopets_page.rb Update most URLs to use HTTPS 2023-10-25 15:22:57 -07:00
outfit.rb Use the main app for outfit saving, not impress-2020 2023-11-02 16:54:35 -07:00
parent_swf_asset_relationship.rb Upgrade to Rails 5.2.8.1 2023-10-23 19:05:05 -07:00
pet.rb Fix old .scoped -> .all Rails upgrade bug 2023-11-09 21:35:42 -08:00
pet_attribute.rb capitalize each word of a species/color name (for Swamp Gas) 2011-07-12 18:22:16 -04:00
pet_state.rb Use the main app for outfit saving, not impress-2020 2023-11-02 16:54:35 -07:00
pet_type.rb Update most URLs to use HTTPS 2023-10-25 15:22:57 -07:00
pretty_param.rb parameterize user params like items, plus a cleaner parameterization scheme 2011-07-26 18:49:52 -04:00
species.rb Remove sanitize_sql_like monkey-patch 2023-10-23 19:05:07 -07:00
static_resource.rb attempt to fix new species_support_ids format. sigh. 2013-01-23 00:25:09 -06:00
swf_asset.rb Add manifest_url to swf_assets table 2023-11-09 21:42:51 -08:00
user.rb Use the main app for outfit saving, not impress-2020 2023-11-02 16:54:35 -07:00
zone.rb Fix bug with Arel ordering 2023-10-23 19:05:05 -07:00