Bug 445758 - OCL Interpreter works very slowly
Summary: OCL Interpreter works very slowly
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2014-10-02 08:14 EDT by Alexander Strakh CLA
Modified: 2018-12-18 04:38 EST (History)
2 users (show)

See Also:


Attachments
Patch with cache implementation for OCL Interpreter (2.22 KB, patch)
2014-10-02 08:14 EDT, Alexander Strakh CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Strakh CLA 2014-10-02 08:14:24 EDT
Created attachment 247568 [details]
Patch with cache implementation for OCL Interpreter

OCL interpreter works very slowly on my project. I have about 200
different nodes with many identical ocl expressions. As a result I
forced to wait about 666 sec. 
After inserting cache implementation for ocl expressions I have result -
about 1sec.

Is it possible to apply my patch?

Patch in attachement.
Comment 1 Maxime Porhel CLA 2014-10-03 03:41:42 EDT
Hi Alexander, 

Thanks for your proposed patch. Could you submit a patch set to Gerrit ? Then we will use it to discuss the technical aspects of the proposed solution. See the Contributor Guide at [1].

Could you also try to use Acceleo expressions instead of OCL ones ? As mentioned in the Sirius Specifier Guide: 'It is highly recommended that you use Acceleo, which implemented the MTL standard and is a super-set of the OCL language, instead of raw OCL.' (see [2] and [3]) Acceleo is a super-set of the OCL language and the Acceleo interpreter already has a cache mechanism.

Regards,

Maxime

[1] http://wiki.eclipse.org/Sirius/Contributor_Guide
[2] http://www.eclipse.org/sirius/doc/specifier/general/Writing_Queries.html#acceleo
[3] http://www.eclipse.org/sirius/doc/specifier/general/Writing_Queries.html#ocl