Cropping images only if something has changed.

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2632
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Cropping images only if something has changed.

Post by steinio »

Hi,

i suggest to change image cropping on startup from happening every time to happen only if game is updated, mods installed/changed or settings changed and cache the cropped images.

This will accelerate the startup immensly.

Cu, steinio.
Image

Transport Belt Repair Man

View unread Posts

nickcombs
Burner Inserter
Burner Inserter
Posts: 10
Joined: Mon Jan 01, 2018 1:25 am
Contact:

Re: Cropping images only if something has changed.

Post by nickcombs »

Agreed, and hopefully only the sprite sheets that are affected would be reloaded (i.e. not all of them reload if a mod changes only one sprite).

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Cropping images only if something has changed.

Post by posila »

steinio wrote:i suggest to change image cropping on startup from happening every time to happen only if game is updated, mods installed/changed or settings changed and cache the cropped images.
Huh? That's how it already works.

nickcombs
Burner Inserter
Burner Inserter
Posts: 10
Joined: Mon Jan 01, 2018 1:25 am
Contact:

Re: Cropping images only if something has changed.

Post by nickcombs »

In practice, rebooting the program takes just as long when toggling mods as it does to load the rest of the game.

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2632
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: Cropping images only if something has changed.

Post by steinio »

Well, image cropping could be a translation error or intended but it seems, the loading images phase eats startup time and not the cropping.
Image

Transport Belt Repair Man

View unread Posts

User avatar
Jon8RFC
Filter Inserter
Filter Inserter
Posts: 553
Joined: Tue May 10, 2016 3:39 pm
Contact:

Re: Cropping images only if something has changed.

Post by Jon8RFC »

I think the cropping is already done that way. Maybe you meant the atlas creation and compression (if you have that enabled)? That is a long load time, for me. I don't know the first thing about how that works, if it's something they can set to do once or not...I'd love it if it could be done once though.
Image

Bilka
Factorio Staff
Factorio Staff
Posts: 3123
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Cropping images only if something has changed.

Post by Bilka »

Jon8RFC wrote:I think the cropping is already done that way. Maybe you meant the atlas creation and compression (if you have that enabled)? That is a long load time, for me. I don't know the first thing about how that works, if it's something they can set to do once or not...I'd love it if it could be done once though.
Go into the config file, enable cache-sprite-atlas and you'll have your wish. The cache file is around 1GB in size which is why it's not a normal option I think.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
Jon8RFC
Filter Inserter
Filter Inserter
Posts: 553
Joined: Tue May 10, 2016 3:39 pm
Contact:

Re: Cropping images only if something has changed.

Post by Jon8RFC »

Bilka wrote:
Jon8RFC wrote:I think the cropping is already done that way. Maybe you meant the atlas creation and compression (if you have that enabled)? That is a long load time, for me. I don't know the first thing about how that works, if it's something they can set to do once or not...I'd love it if it could be done once though.
Go into the config file, enable cache-sprite-atlas and you'll have your wish. The cache file is around 1GB in size which is why it's not a normal option I think.
I edited the wrong line initially, but this is great, thank you! It chops out the first part of creating, which saves a chunk of time. If it saved the compressed atlas, that would cut out the other chunk of time too. This is great so far though.
Image

Post Reply

Return to “Ideas and Suggestions”