How does number of modules affect engine?

LiveCode Builder is a language for extending LiveCode's capabilities, creating new object types as Widgets, and libraries that access lower-level APIs in OSes, applications, and DLLs.

Moderators: LCMark, LCfraser

Post Reply
trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

How does number of modules affect engine?

Post by trevordevore » Sun Mar 15, 2015 2:46 pm

I've started working on moving stack libraries that I have into libraries built with LCB. In the past, I've lumped many different handlers into a single stack script so that I didn't have large numbers of stacks in use. As I work on the LCB libraries, I would like to limit the scope of each one. Is there any performance impact to having 50 library modules included in an application verses 5?
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1209
Joined: Thu Apr 11, 2013 11:27 am

Re: How does number of modules affect engine?

Post by LCMark » Sun Mar 15, 2015 3:04 pm

Modules are intended to be used in precisely the way you describe - allowing you to create small collections of related functionality which are optional. Indeed, having large numbers of library modules is a great deal more efficient than large numbers of stacks-in-use in terms of execution time. All library module handlers are in one handler map associative array - meaning calling a handler takes the same time regardless the number there are. (This is contrast to stacks-in-use which is a linear list which must be searched).

So, the system we are building has to be able to be used in the way you are suggesting so please do use it like that. If you notice any performance problems with doing so then this is something we have to work on as it is how the system is intended to be used.

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: How does number of modules affect engine?

Post by trevordevore » Sun Mar 15, 2015 3:31 pm

Great!

You and your team have done a fantastic job on this Mark. I know it is still in the early stages, but you have given us an incredibly powerful foundation. I'm having a great time working in LCB.
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

Post Reply

Return to “LiveCode Builder”