cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Syntax Check Failed -- when saving Service with a large number of lines of code.

shawnt
1-Newbie

Syntax Check Failed -- when saving Service with a large number of lines of code.

I created a service that takes data from our historian (IP.21) and caches into a Thingworx Data Table.  The table has 761 Columns.  When creating a service to populate the table -- I had approximately 850 lines of JavaScript code.  Is there a maximum limit to the allowable size of a javascript service?

I keep getting error:  syntax check failed:

Encountered code generation error while compiling script: Program too complex: too big jump offset at line 1 column 0 source: /null

What does the "Program too complex" error mean?

2 REPLIES 2
paic
1-Newbie
(To:shawnt)

Hi Shawn, could you email me your script please?


Thanks!



BE_5449806
5-Regular Member
(To:shawnt)

The 3rd party implementation we use for script handling/validation has a 70KB script size limit. The error is awful. We'll try and wrap it and display a more informative message in a future release.

In general script > than 70KB is huge. It's best to break it up. Makes it easier to maintain and debug. Personally I try to keep to a 1000 line limit when writing javascript. Even that makes some js zealots cringe.

Top Tags