﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2972	OMEdit-omc integration for performance	Martin Sjölund	Adeel Asghar	"OMEdit has a considerable overhead calling the omc API. With the bootstrapped compiler, we could use omc as a library rather than as a server. This bring some performance gains. We could gain even better performance by doing some Qt batch operations directly.

Consider a package like:
{{{#!mo
package OMEditStuff

package QVariantMap
class QVariantMap
  extends ExternalObject;
end QVariantMap;

function addString
  input String key;
  input String value;
end addString;

function addMap
  ...
end addMap;

end QVariantMap;

function getAllClassInformation
  input QVariantMap map; // Pointer from the OMEdit Qt program
  ...
  output QVariantMap outMap; 
  ...
algorithm
  Absyn.traverseClass(program, addClassInformationToMap, map);
end getAllClassInformation;

function addClassInformationToMap
  input Absyn.Path fullPath;
  input Absyn.Class cl;
  input QVariantMap map;
algorithm
  QVariantMap.addString(fullPath, getClassInformationStr(cl));
end addClassInformationToMap;

end OMEditStuff;
}}}

OMEditStuff (or a set of packages) could be compiled as a separate object. Nothing in OpenModelica uses them, so OMEdit could simply link in both libOpenModelicaCompiler.so and libOpenModelicaCompilerOMEditStuff.so, calling functions in OMEditStuff, which in turn calls other functions directly.

This way we could insert things directly into the data structures that OMEdit uses. I am certain it would be a lot faster than the current approach."	enhancement	new	high	Future	OMEdit	trunk			Adrian Pop fcasella
