Saving persistance

Let Sim Innovations know about your Air Manager experience and let us know about your dream feature addition

Moderators: russ, Ralph

Post Reply
Message
Author
User avatar
Keith Baxter
Posts: 4685
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Saving persistance

#1 Post by Keith Baxter »

@Corjan

Is there a possibility that we can save persistent files or mark them for non clearance.?

The "Clear Persistence" in <settings> can destroy a lot of work.
Perhaps a "clear all" OR as an "alternative" option. A list of persistence files to clear or not would be a nice feature?

Keith

EDIT; We are hacking here as we cannot write to static files and are forced to write to persistent files. ;)
Yes i hear you. Just don't clear persistence you might say..... A check as to what persistence files are about to be cleared might be the answer.
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
Keith Baxter
Posts: 4685
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Saving persistance

#2 Post by Keith Baxter »

Hi,

Sorry for my impatience, A response if this could/would be considered would be appreciated. Not a top priority but something for advanced users that want to do amazing things with AM.

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
Corjan
Posts: 2941
Joined: Thu Nov 19, 2015 9:04 am

Re: Saving persistance

#3 Post by Corjan »

Hi,


I could maybe add a 'Clear persistence' option to the context menu in the Home tab, so you can remove specific persistance files for a certain instrument or panel.


Corjan

User avatar
Keith Baxter
Posts: 4685
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Saving persistance

#4 Post by Keith Baxter »

Corjan wrote: Mon Nov 29, 2021 8:43 am Hi,


I could maybe add a 'Clear persistence' option to the context menu in the Home tab, so you can remove specific persistance files for a certain instrument or panel.


Corjan
Hi,
That would also work
Thank you for considering.

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
Keith Baxter
Posts: 4685
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Saving persistance

#5 Post by Keith Baxter »

Hi @Corjan

Have you managed to find a spare moment to implementing this in the current beta build?
If so how does it work? And where to access.

Just not sure if I am missing something if you have done what you indicated.

I have many instruments creating persistence files. Loads are test instruments and some are creating BIG persistence files. I fear that it might be slowing down AM. Very difficult to go into the persistence file and delete the correct UUID persistence files.

Thanks

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
Corjan
Posts: 2941
Joined: Thu Nov 19, 2015 9:04 am

Re: Saving persistance

#6 Post by Corjan »

Hi,

This will be implemented in AM 4.2. We are finalizing AM 4.1 at the moment, so there won't be any new features added.
Why do you feel it is slowing down AM? Are you exeriencing lag at certain points of execution?

Corjan

User avatar
Keith Baxter
Posts: 4685
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Saving persistance

#7 Post by Keith Baxter »

Corjan wrote: Sun Dec 19, 2021 9:48 am Hi,

This will be implemented in AM 4.2. We are finalizing AM 4.1 at the moment, so there won't be any new features added.
Why do you feel it is slowing down AM? Are you exeriencing lag at certain points of execution?

Corjan
Corjan,

Thank you.

I use persistence as a tool to do many things. I know that AM is not designed for this but AM has so many wonderful features I just cannot resist hacking and getting awesome results.
This bit of code combines two two static data files and produces a persistence file that I can convert into another .json.

Code: Select all

arip_data     = static_data_load("airport_am.json")
approach_data = static_data_load("approaches.json")

approach_data_persist = persist_add("INFO",{})

new_approach_data={}
approach_data_a={}

local found_feature = nil
	for i = 1,#approach_data["INFO"] do
		new_icao=approach_data["INFO"][i]["ICAO"]

	local icao=new_icao

		for key,value in pairs(arip_data["INFO"]) do
			if string.match(string.upper(value["ICAO"]), icao) then
				found_feature = value
			end
		end 
	
		if found_feature ~= nil then	
			new_approach_data["ICAO"]=new_icao
			new_approach_data["AIRPORT_ID"] =found_feature["ID"]
			new_approach_data["RUNWAY_END_ID"]=approach_data["INFO"][i]["RUNWAY_END_ID"]
			new_approach_data["NAME"]=approach_data["INFO"][i]["NAME"]
			new_approach_data["APPROACH_ID"]=approach_data["INFO"][i]["APPROACH_ID"]
			new_approach_data["TYPE"]=approach_data["INFO"][i]["TYPE"]
			new_approach_data["TRANSITION_TYPE"]=approach_data["INFO"][i]["TRANSITION_TYPE"]	
			table.insert(approach_data_a,new_approach_data)
			print("Record    "..i.."  Of   "..#approach_data["INFO"])
		else
			print("Not found")
		end
	end
print("Iteration  Complete ")
persist_put(approach_data_persist,approach_data_a)
print("Persist Put done ")
value=persist_get(approach_data_persist)
print("Getting Persist")
print(value)
I do the same iterating through the nav files to "scale_rank" airports by runway length for example.

If I leave these large files in persistence. AM seems to slow down. It might be my imagination.
As this is probably only going to be me that has this unique issue. Do not bother trying to find out and fixing.
The feature you are going to add in AM4.2 will do just fine.

Thank you.

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

Post Reply