Opened 14 years ago

Last modified 14 years ago

#1491 closed defect (fixed)

Interactive performance needs to be improved

Reported by: Per Östlund Owned by: Per Östlund
Priority: critical Milestone:
Component: Interactive Environment Version: trunk
Keywords: Cc: Per Östlund,

Description

At the moment it takes a very long time to load icons in OMEdit. This seems to be because of SCodeUtil.translateAbsyn2SCode, which takes about 81 out of 87 seconds when loading the SIUnits package in OMEdit for me (see the attached script which contains all the calls that OMEdit does when loading SIUnits). The reason for this is because every API call in Interactive that fetches information about a class, such as getIconAnnotation, calls SCodeUtil.translateAbsyn2SCode on the entire loaded program (i.e. the whole MSL). This really shouldn't be necessary, since these API calls doesn't change the program in any way.

It should be possible to avoid this by storing the translated program, and only update it when needed. As a first step we should just cache the translated program and re-translate the whole program when the program is changed. The symbol table needs to store a cached SCode program, and the modifying API functions in Interactive needs to update this program and return the symbol table. Something to consider later might be partial updating of the program, but since non-modifying API calls are more likely to be called in large batches by e.g. OMEdit it's not as important to optimize modifying calls for now. Fixing this should improve the user experience of OMEdit quite a lot.

Attachments (1)

SIUnits.mos (172.0 KB ) - added by Per Östlund 14 years ago.

Download all attachments as: .zip

Change History (2)

by Per Östlund, 14 years ago

Attachment: SIUnits.mos added

comment:1 by Martin Sjölund, 14 years ago

Fixed for the attached mos-script

Note: See TracTickets for help on using tickets.