Source language: Translate to:

Are neobook functions extracted during runtime?

Questions and information about using VBScript and JavaScript in NeoBook functions

Moderator: Neosoft Support

Are neobook functions extracted during runtime?

Postby Eduardo Volpi » Thu Mar 14, 2013 6:15 am

Are neobook functions extracted to be used during runtime?
In case positive, where are they extracted to?


Eduardo Volpi
Eduardo Volpi
User avatar
Eduardo Volpi
 
Posts: 57
Joined: Wed Oct 28, 2009 4:42 pm
Location: São Paulo - Brazil

Re: Are neobook functions extracted during runtime?

Postby dpayer » Thu Mar 14, 2013 11:40 am

Eduardo Volpi wrote:Are neobook functions extracted to be used during runtime?
In case positive, where are they extracted to?
Eduardo Volpi


I have written several functions and I never see them 'extracted' in some sort of file format onto the hard drive.

It is my understanding that NB functions act as transportable subroutines. When you compile the pub file, the code is included. (The function code is not present in the .pub file itself which is simply text).

David P.
David Payer
Des Moines, Iowa
USA
User avatar
dpayer
 
Posts: 1380
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Re: Are neobook functions extracted during runtime?

Postby Eduardo Volpi » Thu Mar 14, 2013 12:45 pm

I could not see them extracted anywhere as well.

I had some really big subrotines for writing .rtf files (including images) which were slowing down my pub when openning it, both in Neobook and in runtime mode, then I transported all of them to functions and everything went fine again.

Now I´m just concerned about this functions beeing secure inside my program.
Eduardo Volpi
User avatar
Eduardo Volpi
 
Posts: 57
Joined: Wed Oct 28, 2009 4:42 pm
Location: São Paulo - Brazil

Re: Are neobook functions extracted during runtime?

Postby Eduardo Volpi » Fri Mar 15, 2013 6:31 am

Well, as far as I could verify, once you embed your functions, they are not extracted anywhere.

:)
Eduardo Volpi
User avatar
Eduardo Volpi
 
Posts: 57
Joined: Wed Oct 28, 2009 4:42 pm
Location: São Paulo - Brazil

Re: Are neobook functions extracted during runtime?

Postby Neosoft Support » Fri Mar 15, 2013 9:34 am

Functions are not extracted. They are loaded directly from the EXE into memory when needed.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: Are neobook functions extracted during runtime?

Postby Eduardo Volpi » Fri Mar 15, 2013 11:33 am

Ok. Thanks for the confirmation.
Eduardo Volpi
User avatar
Eduardo Volpi
 
Posts: 57
Joined: Wed Oct 28, 2009 4:42 pm
Location: São Paulo - Brazil

Re: Are neobook functions extracted during runtime?

Postby smokinbanger » Sat Mar 16, 2013 9:44 pm

Because I am always concerned about speed and resources this thread is very interesting. So if I followed correctly, an exe will load faster if very long scripts are placed in functions rather than subs. And a function isn't actually loaded into memory unless it is called for. So relying more on functions can, to an extent, give the best of both worlds. With that said, and speculating that if will take a moment to load, I'm curious how fast a long function can perform in comparison to a sub.
Just Sayin'...
smokinbanger
 
Posts: 198
Joined: Mon Jan 16, 2012 9:53 am
Location: United States

Re: Are neobook functions extracted during runtime?

Postby HPW » Sat Mar 16, 2013 11:47 pm

I do not think that there is much difference between funtions and subs as long we are talking about neoscript.
Both are embedded into the EXE and feeded into the neobook interpreter when called.
A different thing are javascript and vbscript, where other system resource are used.
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: Are neobook functions extracted during runtime?

Postby Eduardo Volpi » Sun Mar 17, 2013 8:30 am

I had nearly 22 subrotines of more than 1200 lines each in my project. This was slowing down the pub both in Neobook and Runtime mode. I decided to transport each of this subs to Functions and everything went fine again, as fast as a new and fresh pub, so, as to My experience, relying more on functions you can obtain the best results.

However, the difference is noticeable on loading time only. Both (subs and functions) perform well and fast when executing.
Eduardo Volpi
User avatar
Eduardo Volpi
 
Posts: 57
Joined: Wed Oct 28, 2009 4:42 pm
Location: São Paulo - Brazil


Return to NeoBook Functions - VBScript & JavaScript

Who is online

Users browsing this forum: No registered users and 2 guests