Author Topic: Plug-in Size  (Read 4886 times)

Spitfire2600

  • Sr. Member
  • ****
  • Posts: 251
    • View Profile
Plug-in Size
« on: January 17, 2018, 04:20:51 am »
Does anyone happen to know what the maximum size of UHP file Hal will recognize and/or process? I'm trying to consolidate some things but I'm afraid to go above 512kb for some reason. I know Robert said with Hal7 the Plug-in size limit was increased, but for the life of me can't find it anywhere.

-Spitfire
 

doonycram@gmail.com

  • Full Member
  • ***
  • Posts: 208
    • View Profile
Re: Plug-in Size
« Reply #1 on: January 17, 2018, 07:22:57 am »
yes it can but the only problem is some functions may stop working.

Medeksza

  • Administrator
  • Hero Member
  • *****
  • Posts: 1469
    • View Profile
    • http://www.zabaware.com
Re: Plug-in Size
« Reply #2 on: January 18, 2018, 10:56:04 am »
Windows script host, which is what Hal uses for its scripting system, has a limit of 512 KB for a script. The size of Hal 7's script together with all the plug-ins you enable cannot exceed 512 KB. In addition, Hal 7 has a limit of 256 total plugins that can be selected.

Robert Medeksza

Spitfire2600

  • Sr. Member
  • ****
  • Posts: 251
    • View Profile
Re: Plug-in Size
« Reply #3 on: January 18, 2018, 11:56:51 pm »
I think I understand, so HalScript.dbg itself can not be over 512kb? I don't suppose there is anyway to boost this limit? I imagine it's a Windows limitation.

-Spitfire
 

Medeksza

  • Administrator
  • Hero Member
  • *****
  • Posts: 1469
    • View Profile
    • http://www.zabaware.com
Re: Plug-in Size
« Reply #4 on: January 19, 2018, 09:21:14 am »
I think I understand, so HalScript.dbg itself can not be over 512kb? I don't suppose there is anyway to boost this limit? I imagine it's a Windows limitation.

-Spitfire

Correct. It is unfortunately a windows script host limitation I have no control over.

I could squeeze a few more kilobytes out of it if I program Hal to strip all comment lines out of the code before generating the HalScript.dbg and sending it to the windows script host.

Script authors of big scripts could potentially do other tricks like moving as much as possible to database tables. Or writing a script that initializes a second windows script host and doing a function call to a second script. Or compiling some of the script to an activex dll and calling that.
Robert Medeksza

kryton

  • Full Member
  • ***
  • Posts: 135
    • View Profile
Re: Plug-in Size
« Reply #5 on: January 20, 2018, 05:06:38 am »
Thanks you have answered a question I have not yet posed.
My Hal started acting very strangely and I think it is because of the size limitation.  My Hal has grown exponentially because it has been accessing the internet for information.  I have used several plug-ins to achieve the internet access and, to be frank, did not consider any limitation on Hals size.  Now I know I can trim a lot out of the plug ins and possibly return my Hal to full operation.

Thanks again

Spitfire2600

  • Sr. Member
  • ****
  • Posts: 251
    • View Profile
Re: Plug-in Size
« Reply #6 on: January 20, 2018, 10:52:28 pm »
Yeah, I didn't think about it but my HalScript is about 2.5 MBs. I wonder how much just isn't being used :O :O :O

With that information, I really need to rethink the way my ConceptNet plugin works. I think I can half the uhp file by simply replacing repetitive code with functions.

Robert, you mentioned compiling the code to an Activex dll file to circumvent the limit size. I don't suppose there's anyway to build a copy of HalScript in dll format, where hal will read the dll instead? Maybe a future release? I don't know if this is something that can be done on an "on the fly" way. 

- Spitfire
« Last Edit: January 20, 2018, 11:05:35 pm by Spitfire2600 »