I'm using Kioo & Reagent to add feedback to a form, so that when a user fills it out they receive indications if their input is valid. The forms are already created in HTML, and I'm pulling them into Kioo as templates via deftemplate.
The problem is that forms of certain complexity take a long time to attach to the webpage, and others take so long the browser times out. For example, the following HTML snippet
<form>
<fieldset>
<legend>Legend</legend>
<div>
<div>
<label for="outcomescompletiondate">Date input label</label>
<input id="outcomescompletiondate" name="outcomescompletiondate" type="date">
</div>
</div>
</fieldset>
</form>
takes about five seconds to appear on the page after the render-component call, in the latest version of Safari on a late 2014 mac mini (2.6 GHz i5, 8 gb ram).
The cljs I'm using is:
(ns adaptdb.outcomes
(:require [reagent.core :as r :refer [atom]]
[kioo.reagent :as k])
(:require-macros [kioo.reagent :refer [defsnippet deftemplate]]))
(deftemplate min-test "adaptdb/views/eTemplates/min-test.html" []
{[:label] (k/content "Updated label.")})
(r/render-component [min-test] (.getElementById js/document "content"))
The actual HTML file I'm hoping to use is a complex form of about 250 lines. The browser page is reloaded by the browser before it appears.
The same files work without issue for server-side rendering of the form using Enlive.
Simplifying the HTML improves things - a shallower structure seems to render without issue. Is there a complexity limit on the HTML Kioo will handle? This is using the latest version, 4.1.0-SNAPSHOT.
Any help would be gratefully received!
Thanks,
Oliver.