Is RapaGUI slower on Windows 10 than on other platforms?

Discuss GUI programming with the RapaGUI plugin here
amyren
Posts: 352
Joined: Thu May 02, 2019 11:53 am

Is RapaGUI slower on Windows 10 than on other platforms?

Post by amyren »

I made this program that is hosting a growing list of nearly 600 items (each with 10 subitems) that now takes about 20 secs to load from file and into the listview. This is on a core i5 laptop, win10 64 bit.
How it works is that it reads the file into a list using ReadTable(), and then inserts the list into the listview. The file size is 79kb. I was thinking this was normal time to load and process the data and presenting it in the listview. Until today, I created a MorphOS version to test on my mac mini. It loads the same data in just a few seconds.
On the same laptop I do have Amikit installed, so I tested a 68k_FPU version running in AmiKit/WinUAE. It also loads the data in a few seconds.
Next test, I have Windows 7 in Virtualbox on the same laptop. Under Win 7 it loads the data in 7-10 seconds.

Any clues on why it performs so much slower on Windows 10 compared to on emulated 68k?
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Is RapaGUI slower on Windows 10 than on other platforms?

Post by airsoftsoftwair »

Please post an MCVE that shows the issue.
amyren
Posts: 352
Joined: Thu May 02, 2019 11:53 am

Re: Is RapaGUI slower on Windows 10 than on other platforms?

Post by amyren »

Sure. Use your own Dialogs example. Insert this code at the bottom of the script, just before the main loop.

Code: Select all

Function p_load()
	adressbook = CreateList()
	If Exists("adressbook.dat")
		moai.DoMethod("lv", "clear")
		OpenFile(1, "adressbook.dat", #MODE_READ)
			adressbook = ReadTable(1, {Adapter = "default"})
		CloseFile(1)
		For i = 0 To ListItems(adressbook)-1
			state = adressbook[i][0]
			lastname$ = adressbook[i][1]
			firstname$ = adressbook[i][2]
			street$ = adressbook[i][3]
			city$ = adressbook[i][4]
			zip$ = adressbook[i][5]
			country$ = adressbook[i][6]
		moai.DoMethod("lv", "insert", "bottom", state, lastname$, firstname$, street$, city$, zip$, country$)
		Next
	EndIf
EndFunction

p_load
Now create a file adressbook.dat similar to this. But duplicate the entries so that the data file grows to 3000 lines or so. The bigger file you create, the easier to see the difference.

Code: Select all

[
	[
		"0",
		"Panther",
		"Pink",
		"Longlongroad 9876",
		"Toontown",
		"88228",
		"Disneyland"
	],
	[
		"1",
		"Wellington"
		"Allison",
		"Startling alley 42379",
		"Wonderland",
		"234566",
		"Farawayistan"
	]
]
User avatar
lazi
Posts: 625
Joined: Thu Feb 24, 2011 11:08 pm

Re: Is RapaGUI slower on Windows 10 than on other platforms?

Post by lazi »

It does not fullfill "C" in MCVE. :-)

Anyway, yes I found it too that filling listitems is far slower on windows than Amiga. So please feed this topic with useable information that helps to solve this problem.
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Is RapaGUI slower on Windows 10 than on other platforms?

Post by airsoftsoftwair »

lazi wrote: Sun May 09, 2021 4:10 pm It does not fullfill "C" in MCVE. :-)
The "M" is also not fulfilled... I'm sure this can be made much shorter if all it needs to do is inserting lots of entries. No need to read from external files or anything in order to demonstrate slow insertion ;)
amyren
Posts: 352
Joined: Thu May 02, 2019 11:53 am

Re: Is RapaGUI slower on Windows 10 than on other platforms?

Post by amyren »

It does not fullfill "C" in MCVE. :-)
The "M" is also not fulfilled... I'm sure this can be made much shorter
Nitpickers :lol:

I also tried putting a counter and a debugprint in there just to see what was going on. It starts off quite fast, but the more items that are filled the slower it proceeds.
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Is RapaGUI slower on Windows 10 than on other platforms?

Post by airsoftsoftwair »

amyren wrote: Sun May 09, 2021 9:43 pm Nitpickers :lol:
Well, in the end it's just about time economics. To turn your post into an example that I can run and try here I probably need at least 10 minutes. That of course decreases my motivation to just go and give it a try. The ideal MCVE is something that can be copied and pasted directly into Hollywood, so in the best case it should contain the XML as well. See here for an example.
amyren
Posts: 352
Joined: Thu May 02, 2019 11:53 am

Re: Is RapaGUI slower on Windows 10 than on other platforms?

Post by amyren »

Perhaps this example fulfills more letters in MCVE, at least the C

Code: Select all

@REQUIRE "RapaGUI"
moai.CreateApp([[
<?xml version="1.0" encoding="iso-8859-1"?>
<application>
   <window title="Test program">
	<vgroup>
				<listview id="lv" notify="active">
					<column title="Select" checkbox="true"/>
					<column title="Last name" editable="true"/>
					<column title="First name" editable="true"/>
					<column title="Street" editable="true"/>
					<column title="City" editable="true"/>
					<column title="ZIP" editable="true"/>								
					<column title="Country" editable="true"/>
				</listview>
	</vgroup>
	</window>
</application>
]])
moai.DoMethod("lv", "clear")
state=1
lastname$="Olsen"
firstname$="Gjertrud"
street$="Skolegata 123B"
city$="Trondheim"
zip$="7103"
country$="Norge"
For i = 0 To 500
	moai.DoMethod("lv", "insert", "bottom", state, lastname$, firstname$, street$, city$, zip$, country$)
	DebugPrint(i)
Next
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Is RapaGUI slower on Windows 10 than on other platforms?

Post by airsoftsoftwair »

Yes, that's what I call an MCVE. So I did two tests:

With RapaGUI 1.2: Takes about 15 seconds here.
With RapaGUI 2.0: Takes about 0.024 seconds here :)

So consider this fixed already!
matty47
Posts: 18
Joined: Fri May 21, 2021 10:28 am

Re: Is RapaGUI slower on Windows 10 than on other platforms?

Post by matty47 »

Is RapaGUI 2.0 available or still being finalised. THe download page only seems to have version 1.2.
Thanks
Post Reply