PDA

View Full Version : Slow C7 template registering



NewsArchive
04-17-2009, 01:41 AM
I am still finding C7 template registration under SB to be pretty slow.
It has been previously reported that part of the problem is that
almost the entire IDE must be loaded to register one template. OK, that
part is understandable.

I am finding that if there are K templates to register, SB appears to
take K times the time to register one template. One of my installers
that registers only one template takes about one second on a 3 Ghz Core
2 Duo, and about 4 seconds on a 2.6 Ghz P4. However, another that
registers 14 templates takes about 15 seconds on the fast machine, and
over a minute on the P4.

However, once loaded, the IDE can register an entire batch of templates
in one operation, so huge increase in time is hard to understand. I can
manually register the batch of 14 templates in about a second or two in
the IDE. However, the script with 14 templates which uses "Register all
Pending Templates" only once, takes at least 14 times as long as a
script with one template to register.

Does the SV template registration interface not support batch registration?

--
Phil Carroll
http://www.enablingsimplicity.com

NewsArchive
04-17-2009, 01:42 AM
Hi Phil,

> I am finding that if there are K templates to register, SB appears to
> take K times the time to register one template. One of my installers
> that registers only one template takes about one second on a 3 Ghz Core
> 2 Duo, and about 4 seconds on a 2.6 Ghz P4. However, another that
> registers 14 templates takes about 15 seconds on the fast machine, and
> over a minute on the P4.

Wow! Registering a single template in C7 (the build next before Gold, don't
remember what it was) took consistently about 20-25 seconds on a AMD 9550
Quad core in a XP VM using two CPUs and 2GB memory!

It's not clear to me from the docs if ClarionCL.exe supports passing
multiple -tr switched - it looks like it, but I'm not sure.

Best regards,

--
Arnór Baldvinsson - Icetips Alta LLC
Port Angeles, Washington
www.icetips.com - www.buildautomator.com

Icetips product subscriptions at http://www.icetips.com/subscribe.php

NewsArchive
04-17-2009, 01:43 AM
Phil,

No, the SV template registration interface does not support batch
registration. The ClarionCL.exe can only take 1 parameter and all others
are ignored. In other words, you can only register one template.

HTH,

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
04-18-2009, 01:25 AM
Hi Friedrich,

> No, the SV template registration interface does not support batch
> registration. The ClarionCL.exe can only take 1 parameter and all others
> are ignored. In other words, you can only register one template.

According to the help on ClarionCL.exe:

ClarionCL [switch [parameter [parameter […]]][switch [parameter [parameter
[…]]] […]]

This _kind_ of indicates to me that it should be able to take multiple
switches, but I don't know if it supports multiple -tr switches.

Best regards,


--
Arnór Baldvinsson - Icetips Alta LLC
Port Angeles, Washington
www.icetips.com - www.buildautomator.com

Icetips product subscriptions at http://www.icetips.com/subscribe.php

NewsArchive
04-18-2009, 01:26 AM
Hi Arnór,

Hmm, that's interesting and your are right. You can define multiple -tr
switches in one call!! I did not expect this multiple-switch thing and
clearly misinterpreted the documentation.

So my previous statement is wrong. ClarionCL.exe supports batch
registration. SetupBuilder does not support it in the current version. Not
sure if and when we support it from the installer runtime.

Thanks for bringing this to my attention!

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
04-18-2009, 01:27 AM
Hi Friedrich,

> Hmm, that's interesting and your are right. You can define multiple -tr
> switches in one call!! I did not expect this multiple-switch thing and
> clearly misinterpreted the documentation.

I'm just glad I'm not the only one<bg>

Best regards,

--
Arnór Baldvinsson - Icetips Alta LLC
Port Angeles, Washington
www.icetips.com - www.buildautomator.com

Icetips product subscriptions at http://www.icetips.com/subscribe.php

NewsArchive
04-18-2009, 01:27 AM
> So my previous statement is wrong. ClarionCL.exe supports batch
> registration. SetupBuilder does not support it in the current version. Not
> sure if and when we support it from the installer runtime.

Bummer. My customers are killing one of my installs before it completes
because they think it is hung.

I guess I can call ClarionCl from the script instead of using the SB
registration feature.

Anything I should watch out for? What does the SB registration feature
do besides call ClarionCl? (on Clarion 7)

I just tried calling ClarionCl from a command line with two template
paths and see that it works ok. I guess now I just need to figure out
whether the call buffer is big enough for my worst case batch of
registrations.

--
Phil Carroll
http://www.enablingsimplicity.com

NewsArchive
04-18-2009, 01:28 AM
Hi Phil,

> I just tried calling ClarionCl from a command line with two template
> paths and see that it works ok. I guess now I just need to figure out
> whether the call buffer is big enough for my worst case batch of
> registrations.

You can create progress bar dialog in SB6 and then just advance it as you
call ClarionCL.exe registering each template. That way you give feedback to
the user:)

Best regards,

--
Arnór Baldvinsson - Icetips Alta LLC
Port Angeles, Washington
www.icetips.com - www.buildautomator.com

Icetips product subscriptions at http://www.icetips.com/subscribe.php

NewsArchive
04-20-2009, 01:14 AM
SetupBuilder also prepares the uninstall application for automatic C7
template unregistration.

The ShellExecuteEx function has a command line length limit of around 2,048
bytes. So in the worst case, you can only register 7 templates in a batch
call when using ShellExecuteEx.

-BUT-

The SetupBuilder runtime makes use of the CreateProcess API when registering
C7 templates. The maximum command line length is 32,767 characters in this
case. So from the technical point of view, SetupBuilder would be able to
support it.

But it's not a trivial task to change the installer runtime in such a way
that it can handle batch registration for C7 templates.

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
04-20-2009, 01:15 AM
Friedrich,

> The maximum command line length is 32,767 characters

Assuming ClarionCL can handle that internally!<g>

--
Lee White

Enroll Today at http://CWaddons.com

NewsArchive
04-20-2009, 01:15 AM
Lee,

>> The maximum command line length is 32,767 characters
>
> Assuming ClarionCL can handle that internally!<g>

Yes, good point. I have to check this with SV first :)

Friedrich

NewsArchive
04-20-2009, 01:16 AM
From the docs, I find that ClarionCl will use the RED file to locate
templates in the absence of a path. In that case, my script can call
ClarionCl without using a template path and avoid the buffer length
issues. My template registration already requires redirection anyway in
order to find supporting files, including any supporting template files.

In the future, it would be nice if SB offered C7 batch template
registration as an option, based on using redirection.

--
Phil Carroll
http://www.enablingsimplicity.com

NewsArchive
04-20-2009, 01:17 AM
> In the future, it would be nice if SB offered C7 batch template
> registration as an option, based on using redirection.

Or just passing a external file that contained the names of the templates
to be registered.

One call, same as registering a single template (different flag to tell it
to use the external file).

That file could be used then for a batch unregister (or at least absorbed
by SetupBuilder to add to the log)


Charles


--
-------------------------------------------------------------------------------------------------------
Charles Edmonds
www.ezchangelog.com - "Free ChangeLog software to manage your projects!"
www.setupcast.com - "A revolutionary new publishing system for software
developers - enhanced for SetupBuilder users!"
www.pagesnip.com - "Print and Save the Web, just the way you want it!"
www.clarionproseries.com - "Serious imaging tools for Clarion Developers"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms!"
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------

NewsArchive
04-20-2009, 01:22 AM
>> > In the future, it would be nice if SB offered C7 batch template
>> > registration as an option, based on using redirection.
>
> Or just passing a external file that contained the names of the templates
> to be registered.
>
> One call, same as registering a single template (different flag to tell it
> to use the external file).
>
> That file could be used then for a batch unregister (or at least absorbed
> by SetupBuilder to add to the log)

Or better, a string containing the list in the standard SB list format:
name1|name2|...|nameN

I have a script working now based on such a list. (attached) One
complication I didn't anticipate:

Using "Run Program" provides only 127 bytes for command line switches.
The extremely short parameter list means multiple calls in my case. Not
a big deal, just complicated the script unnecessarily. But, on the good
side, now it will work with an unlimited number of templates.

Using this script, my fast machine registers all the templates in 3-4
seconds. Using SB registration it takes 15-16 seconds. I expect the
install on slow machines to now be fast enough the user won't consider
it hung. Still have to set up the uninstall. (Also didn't anticipate
that part.)

Friedrich: Why so absurdly stingy with buffer space for switches on Run
Program?

--
Phil Carroll
http://www.enablingsimplicity.com