cancel
Showing results for 
Search instead for 
Did you mean: 

JAVA Macro Vs VBScript Macro

Solved
Frequent Contributor

JAVA Macro Vs VBScript Macro

Hi All,

We are planning to write our future Macros in Java instead of VBScript. 

We have performance issues in VBScript Macros with huge business logic. Does the development of these macrs on java improves the performance?

 

We have :

1. Macros that run on on some events (meta commands)

2. Macros that run for 1 or 2 minutes (for ex:  bulk users creation)

3. Macros that run for more than 5 to 6 hours (Website generation scripts)

 Which is more preferabale language to above three types of scripts.

 

Some specific questions:

1. Is java convinient only for external developments outside Mega (developing external tools connecting to Mega from outside) ?

2. In which scenarios you suggest Java development?

 

Thanks in advance.

 

Venky.

Colruyt Team
5 Replies
Frequent Contributor

Re: JAVA Macro Vs VBScript Macro

Hi Colruyt Team, Venky ?
Generally, in MEGA and not especially in MEGA , I think the java apps are slow and unstable. Java is low it is engraved in my mind for my entire life. SAP and other main editors were very disappointed with their willing to provide a GUI based on it ... for complex calculation it is moreover impossible. That's my feedback about JAVA but very oriented.

Lionel Mazurié
MEGA

Re: JAVA Macro Vs VBScript Macro

Hello


It is usually considered that
- VB script is appropriate for code with limited volume.
- Java is appropriate when code is voluminous, complex to develop and/or specific user interface is used

 

For voluminous and complex code, a confortable developpement environment (debugging...) is required, which excludes VB script. This is mainly a maintenance concerne because VB script runs faster than java.

Let us remind that MEGA, as a software editor, uses Java at a significant scale (more that 80 jar components)

 

Regarding static web site generation, do not expected to reduce the generation time by triggering the generation with another language.

 

However I am not a development expert. I recommend that communiy users that have a real experience share it with us.

Jerome
Contributor

Re: JAVA Macro Vs VBScript Macro

Hi Colruyt Team,

 

Using Java will not make a big difference in terms of performance because the VB Script and Java APIs are based on the same internal API.

 

Here are a few things you can look at to make your code run faster:

- most of the time using collections instead of queries to retrieve objects is faster (it can make a big difference)

- check whether you are using identifiers when accessing metattributes, links and objects

- make sure to release megaobject and megacollection objects when they are no longer in use

 

also the technical article "All about starting with APIs" contains a lot of information on how to use the API effectively

 

Best regards

 

Gregory

Contributor

Re: JAVA Macro Vs VBScript Macro

Hi,

 

Leslie Robinet has made a  very usefull blog concerning macro/query performance :

 

http://community.mega.com/t5/Product-Blog/I-want-it-all-and-I-want-it-now-Performance-in-MEGA-delive...

 

Kind regards,

Wim VdV

 

Frequent Contributor

Re: JAVA Macro Vs VBScript Macro

Hi Wim,

Access denied to view that page Smiley Sad .

 

Regards,

Venkatesh.

Colruyt Team