SDK:C/make very slow with OS4.1FE (SOLVED)

Have a question about our Software Developer Kit? Ask them here.
Post Reply
xenic
Posts: 1185
Joined: Sun Jun 19, 2011 12:06 am

SDK:C/make very slow with OS4.1FE (SOLVED)

Post by xenic »

I reported in the General AmigaOS forum that my compiles for large multi-file sources take over twice as long with OS4.1FE as with OS4.1u6. I have since discovered that the problem is with the current "make" command. If I replace the SDK:C/make command in the current public SDK with the "make" command from SDK v51.22, the compile speed is just as fast as the current make command is with OS4.1u6. All later make commands are just as slow as the current make with OS4.1u6. Something is wrong with the way the current make operates with OS4.1FE.
To summarize:
Current make command with OS4.1u6 operates normally.
Current make command with OS4.1FE take over twice as long to compile large multi-file sources.
Make command from SDK v51.22 operates normally and is as fast as current make with OS4.1u6.

Could we please get an updated make command that doesn't operate in slow motion??
Last edited by xenic on Fri Aug 28, 2015 2:37 pm, edited 1 time in total.
AmigaOne X1000 with 2GB memory - OS4.1 FE
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 600
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: SDK:C/make very slow with OS4.1FE

Post by broadblues »

xenic wrote:I reported in the General AmigaOS forum that my compiles for large multi-file sources take over twice as long with OS4.1FE as with OS4.1u6. I have since discovered that the problem is with the current "make" command. If I replace the SDK:C/make command in the current public SDK with the "make" command from SDK v51.22, the compile speed is just as fast as the current make command is with OS4.1u6. All later make commands are just as slow as the current make with OS4.1u6. Something is wrong with the way the current make operates with OS4.1FE.
To summarize:
Current make command with OS4.1u6 operates normally.
Current make command with OS4.1FE take over twice as long to compile large multi-file sources.
Make command from SDK v51.22 operates normally and is as fast as current make with OS4.1u6.

Could we please get an updated make command that doesn't operate in slow motion??
Whilst I always work on latest beta when compiling I can't say I've noticed any deteriation in compiling speeds over time. However as my SDK is built incrementaly perhspa I'm still using an old make?

What versions are you refereing too?

For example here I'm using:

9.AmigaOS4:> make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for AmigaOS
9.AmigaOS4:> version appdir:make
make 53.1
9.AmigaOS4:> version appdir:make full
make 53.1 (22/01/2009)
9.AmigaOS4:> which make
Programing:SDK/C/make
9.AmigaOS4:>
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1479
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: SDK:C/make very slow with OS4.1FE

Post by tonyw »

There is no "make" command in OS4 or Final Edition. It's part of the SDK.

If you are experiencing different performance between Final Edition and OS4.1.6, then it is most likely due to the filesystems or partitions you are using.

What is different? What has changed?
cheers
tony
xenic
Posts: 1185
Joined: Sun Jun 19, 2011 12:06 am

Re: SDK:C/make very slow with OS4.1FE

Post by xenic »

tonyw wrote: If you are experiencing different performance between Final Edition and OS4.1.6, then it is most likely due to the filesystems or partitions you are using.

What is different? What has changed?
Both boot partitions and the SDK are all on the same hard-disk. The FE partition is an SFS partition as recommended. The Update6 partition is an FFS partition. I switch boot partitions by changing the boot priorities with Media Toolbox and cold rebooting. I check that I'm using the correct kickstart by checking the version of dos.library. The SDK is located on an SFS2 partition. The sources being compiled are on another SFS2 partition.

The speed difference was confirmed in my "Slow compiling with OS4.1FE" topic in the General AmigaOS forum. The compile speed difference isn't perceptually apparent in small compiles. When you are compiling a large application containing hundreds of source files like Dopus5, the speed difference is very apparent. If you don't have large sources to test, here is a simple demonstration:

Create a dummy makefile in ram: with this content:

Code: Select all

all: clean

clean:
	rm -f *.o
	rm -f *.o
	rm -f *.o
	rm -f *.o
	rm -f *.o
	rm -f *.o
	rm -f *.o
	rm -f *.o
	rm -f *.o
	rm -f *.o
Make sure you're using the make command included in the latest public SDK v53.24. Since I can't seem to embed tabs in the code you need to replace the spaces in front of the "rm -f *.o" commands with tabs. Name the file "makefile", open a shell and CD to ram: and then enter make or make -f makefile. The commands will scroll by slowly.

If you perform the same procedure with OS4.1u6 the commands will scroll by in a flash (quickly).

If it's too much trouble to test with OS4.1u6 then comment out the "all:clean" and "clean:" lines with a semi-colon, save the file, set the "script" protection bit and then run or execute the file as a script. The commands will zoom by just as they do when the makefile is run make in OS4.1u6.

The make command from SDK v51.22 will run the above makefile as fast as when it's run as a script.
AmigaOne X1000 with 2GB memory - OS4.1 FE
xenic
Posts: 1185
Joined: Sun Jun 19, 2011 12:06 am

Re: SDK:C/make very slow with OS4.1FE

Post by xenic »

broadblues wrote: Whilst I always work on latest beta when compiling I can't say I've noticed any deteriation in compiling speeds over time. However as my SDK is built incrementaly perhspa I'm still using an old make?

What versions are you refereing too?
The slow version I'm complaining about is make version 53.1 from the latest public SDK. The old version that still works fast with OS4.1FE is make version 3.81rc2-4 from SDK v51.22. If you try the procedure I described to Tony you should be able to see how slow the current make command is with OS4.1FE.

If you would like to see how slow a huge application is with make 53.1 you can D/L a Dopus5 snapshot at https://sourceforge.net/p/dopus5allamig ... ree/trunk/ and compile it with "timer" from OS4Depot. Just CD to the trunk/source directory and enter "timer make os4". Then compile it the same way after cold booting with OS4.1u6. The times are dramatically different. You may need a couple of extra includes from https://sourceforge.net/p/dopus5allamig ... _includes/ if you don't already have them installed.

EDIT: If you try compiling Dopus5, clean the sources with "make os4 cleanall" to see how slow a simple clean is.
AmigaOne X1000 with 2GB memory - OS4.1 FE
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 600
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: SDK:C/make very slow with OS4.1FE

Post by broadblues »

@Xenic

[Edit]you posted whilst I was replying makeing my comment redundant[/edit]

Looking at your example make file my immediate thought is check your setting for * as wild card in DOS prefs, between your two installations.

Depending exactly which version of make your are talking about the recent 'make' uses the amigaos shel by default and 'gmake' the abc-sh, the older ones maynot do so.
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 600
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: SDK:C/make very slow with OS4.1FE

Post by broadblues »

Interesting, I don;t have immediate access to your old make version but running a test make file I found something odd.

I set up a script

DEL

Code: Select all

.bra {
.ket }
.key FILE,QUIET/S

DELETE {FILE}
SET
and a makefile

Code: Select all

all: clean

clean:
	ECHO >ram:foo.o
	DEL *.o QUIET
	ECHO >ram:foo.o
	DEL *.o QUIET
	ECHO >ram:foo.o
	DEL *.o QUIET
	ECHO >ram:foo.o
	DEL *.o QUIET
	ECHO >ram:foo.o
	DEL *.o QUIET
	ECHO >ram:foo.o
	DEL *.o QUIET
	ECHO >ram:foo.o
	DEL *.o QUIET
	ECHO >ram:foo.o
	DEL *.o QUIET
	ECHO >ram:foo.o
	DEL *.o QUIET
	ECHO >ram:foo.o
	DEL *.o QUIET
	ECHO >ram:foo.o
the call to set outputs the vars one of which is __Runtime this shows that all the deletes took

_RunTime 0.007573

but the makefile took

_RunTime 12.69713

very slow indeed!

But I'm not seeing this when I build software from CodeBench, or at least I'm not aware of it building seems very fast on my X1000 I'm testing on my SAM 440 here though.

So I tried typing ChangeTaskPri 2 and ran make again

_RunTime 3.080005

Better.

I tried assign T: work:T as make puts temporary scripts in T:

_RunTime 1.560468
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1479
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: SDK:C/make very slow with OS4.1FE

Post by tonyw »

I don't have time to do much at the moment, but I just tried changing priority for a "make" of a big job that I'm working on. I'm compiling on the X-1000 with a beta system (neither 4.1.6 nor FE).

Normal conditions, a full Make takes 1m 36s. When I changed the priority to 2, it took 1m 28s.

But in that state, the console would not run properly. Trying to type a file to the console, it would print for a second, pause whilst it filled its buffers, then print again, and so on.

I would need to install the SDK startup script (etc) on the FE partition to test it under that system. I won't be able to do that until tomorrow night.
cheers
tony
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 600
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: SDK:C/make very slow with OS4.1FE

Post by broadblues »

I did a test on my X1000 on a moderatly sized project (8000 lines of code)

Normal priority -> 31 secs to build
ChangeTaskPri 2 -> 26 secs to build

So a slow down perhaps but not as dramatic as on my SAM.
xenic
Posts: 1185
Joined: Sun Jun 19, 2011 12:06 am

Re: SDK:C/make very slow with OS4.1FE

Post by xenic »

broadblues wrote:Looking at your example make file my immediate thought is check your setting for * as wild card in DOS prefs, between your two installations.
The AmigaDOS setting for wildcards has no effect on the SDK's *nix based commands, regardless of what shell they are executed with. The command "rm -f *.o" will receive "*.o" as an argument and interpret it as a wildcard. That's the case even if it is run from an AmigaDOS script. Set AmigaDOS not recognize * as a wildcard. If you copy any file to ram: with a .o file extension, CD to ram and enter < rm -f *.o > in the shell then the file will be deleted.
broadblues wrote:I did a test on my X1000 on a moderatly sized project (8000 lines of code)
Normal priority -> 31 secs to build
ChangeTaskPri 2 -> 26 secs to build
So a slow down perhaps but not as dramatic as on my SAM.
The make command (v53.1) is running at the same priority on OS4.1u6 and OS4.1FE so the priority isn't the issue. The project I'm building has over 500 source files (.c), 6 sub-makefiles, 23 sub-sub-makefiles and 50,000+ lines of code. The more source files and makefiles the more dramatic the compile time difference between OS4.1FE and OS4.1u6. If you combined all your source files into one, you probably wouldn't see any significant time difference. The time difference seems to depend on how many files make has to load and execute. Here are my times for compiling Dopus5 using the timer command (timer make):

Compile time with OS4.1 Update6: 225.2183 seconds
Compile time with OS4.1 FE: 541.3016 seconds

That's a big turnaround time when you're trying to debug & test. The point I'm trying to make is that something changed between OS4.1u6 and OS4.1FE that is causing make 53.1 to take much longer to compile huge applications. I'm just trying to help other programmers compile more effeciently and help the OS4 devs fix things that have apparently gone wrong. Because make v3.81rc2-4 is just as fast on OS4.1u6 and OS4.1FE, I'm convinced that make v53.1 needs some changes to make it work as well with OS4.1FE as with OS4.1u6.

Whether it's fixed or not will make little difference to me because I made some minor changes to the make v3.81rc2-4 sources and compiled it for my own use. I can compile just as fast on OS4.1FE with my modified make v3.81rc2-4 as I previously did with make v53.1 on OS4.1u6. I'll probably continue to use make v3.81rc2-4 since I can stop a compile with Ctrl-C whereas there doesn't seem to be any way to stop make 53.1 once it starts a compile. The only reason I'm reporting the make slowdown is to help others.
AmigaOne X1000 with 2GB memory - OS4.1 FE
Post Reply