mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-18 20:28:01 -06:00
Significantly improve the speed of the version upgrader
This knocked about 10 seconds from my boot time. Huzzah :D
This commit is contained in:
parent
48c3ec77dc
commit
4fb9042dbf
4 changed files with 2 additions and 29 deletions
|
@ -33,12 +33,6 @@ default_qualities_per_nozzle_and_material = {
|
|||
|
||||
|
||||
class VersionUpgrade460to462(VersionUpgrade):
|
||||
def getCfgVersion(self, serialised: str) -> int:
|
||||
parser = configparser.ConfigParser(interpolation = None)
|
||||
parser.read_string(serialised)
|
||||
format_version = int(parser.get("general", "version")) # Explicitly give an exception when this fails. That means that the file format is not recognised.
|
||||
setting_version = int(parser.get("metadata", "setting_version", fallback = "0"))
|
||||
return format_version * 1000000 + setting_version
|
||||
|
||||
def upgradePreferences(self, serialized: str, filename: str) -> Tuple[List[str], List[str]]:
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue