OpenEnergyPlatform / oeplatform

Repository for the code of the Open Energy Platform (OEP) website. The OEP provides an interface to the Open Energy Family
http://openenergyplatform.org/
GNU Affero General Public License v3.0
61 stars 19 forks source link

Loading of the ontology page takes too long #1585

Closed MGlauer closed 1 month ago

MGlauer commented 3 months ago

Description of the issue

Loading of the ontology page takes more than a minute. This is quite a bad first impression for first-time users and will likely drive them away.

Steps to Reproduce

  1. Visit https://openenergy-platform.org/ontology/oeo/ with an empty cache
  2. Wait

Ideas of solution

I do not know what is taking so long. Once loaded, the page shows an overview of the modules. The slowdown seems to not occur on the client-side (I stopped the JS execution and the loading finished immediately upon resuming), but on the server side. So, I guess the server is loading something from somewhere that is just cached on the client-side, but not on the server side. As the request does not have any parameters, it is not immediately apparent, why this is necessary.

Context and Environment

Workflow checklist

jh-RLI commented 3 months ago

It never took longer than 20 sec. for me, but it still takes far too long.

I assume we can improve this by using the cpython implementation of the owl parser. I assume Python is just slow. It reads the files from the oeo release that are stored locally on the server. We will try this soon. There is this warning showing up:

* Owlready2 * Warning: optimized Cython parser module 'owlready2_optimized' is not available, defaulting to slower Python implementation

Also a good point is to cache this on the server side and only update it once a new oeo version is added.