Menu

#7 Configuration form loads very slowly

1.0
closed
nobody
None
2020-04-18
2016-11-30
il--ya
No

In hoam/javascript/form.js, function HOAM_formFieldTags () , calls HOAM_languageLookup ('field_names|calendar|show') , HOAM_languageLookup ('field_names|admin|enable') and HOAM_languageLookup ('field_names|calendar|show') inside cycles. Each HOAM_languageLookup call triggers a separate HTTP request to the server, which is really slooooooow (my browser times out half of the time).
As a quick fix, I have added this at the begining of the the function:

    var admin_enable_str = HOAM_languageLookup ('field_names|admin|enable');
    var admin_preview_str = HOAM_languageLookup ('field_names|admin|preview');
    var calendar_show_str = HOAM_languageLookup ('field_names|calendar|show');

And then use these variables instead of function calls.

I'm not happy about abundance of ajax requests for constant strings (why not just embed them into the page when it's generated?) so I'm going to get rid of them altogether one way or another in the future, but this workaround allows to deal with them here and now very efficiently.

Discussion

  • rob

    rob - 2020-04-18
    • status: open --> closed
    • Milestone: 2.0 --> 1.0
     
  • rob

    rob - 2020-04-18

    This has been resolved in the most recent release.

     

Log in to post a comment.