

{"id":1538,"date":"2015-07-20T00:00:41","date_gmt":"2015-07-19T22:00:41","guid":{"rendered":"http:\/\/fabsk.eu\/blog\/?p=1538"},"modified":"2015-07-19T23:00:14","modified_gmt":"2015-07-19T21:00:14","slug":"lazarus-form-recovery-makes-forms-submit-slow","status":"publish","type":"post","link":"https:\/\/fabsk.eu\/blog\/2015\/07\/20\/lazarus-form-recovery-makes-forms-submit-slow\/","title":{"rendered":"\u00ab\u00a0Lazarus: Form Recovery\u00a0\u00bb makes forms submit slow :-("},"content":{"rendered":"<p>\u00ab\u00a0<a href=\"https:\/\/addons.mozilla.org\/fr\/firefox\/addon\/lazarus-form-recovery\/\">Lazarus: Form Recovery<\/a>\u00a0\u00bb is a Firefox add-on that saves the text of the forms so it can be restored later (very handy, for example if you have typed a long mail\/message\/Wikipedia contribution and something bad happens, like a crash or a computer shutdown).<\/p>\n<p>Unfortunately, I realized that it causes a small delay (something like 1.5s) when submitting a form. It is perceptible in the case of an Ajax form (or even an \u00ab\u00a0offline\u00a0\u00bb form where nothing is sent but data is processed locally in Javascript; in this case the result should be instant). I spend some times searching around, it was crazy! No problem with a simple \u00ab\u00a0onClick\u00a0\u00bb but only with \u00ab\u00a0onSubmit\u00a0\u00bb. Was it the debug version of React? No! Or the fact that I used the Javascript compilation of React JSX? No! There was nothing special in the Performance analyser. Then I realized that Chromium was fast. And Firefox dev edition was fast. Then I began the Firefox add-on hunt\u2026<\/p>\n<p>That&rsquo;s strange that saving is not asynchronous\u2026<\/p>\n<p>(by the way, if you want to compile JSX files using Node.js, don&rsquo;t install \u00ab\u00a0node\u00a0\u00bb on Ubuntu, that&rsquo;s not \u00ab\u00a0Node.js\u00a0\u00bb! Install \u00ab\u00a0nodejs\u00a0\u00bb instead, and make a symlink from \u00ab\u00a0\/usr\/bin\/nodejs\u00a0\u00bb to \u00ab\u00a0node\u00a0\u00bb somewhere on your path. Otherwise you may ask yourself why the JSX compiler does nothing. It&rsquo;s just that the executable \u00ab\u00a0node\u00a0\u00bb is completely unrelated)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u00ab\u00a0Lazarus: Form Recovery\u00a0\u00bb is a Firefox add-on that saves the text of the forms so it can be restored later (very handy, for example if you have typed a long mail\/message\/Wikipedia contribution and something bad happens, like a crash or a computer shutdown). Unfortunately, I realized that it causes a small delay (something like 1.5s) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24,6],"tags":[],"class_list":["post-1538","post","type-post","status-publish","format-standard","hentry","category-dev","category-informatique","\"lang=\"en"],"_links":{"self":[{"href":"https:\/\/fabsk.eu\/blog\/wp-json\/wp\/v2\/posts\/1538","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fabsk.eu\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fabsk.eu\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fabsk.eu\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fabsk.eu\/blog\/wp-json\/wp\/v2\/comments?post=1538"}],"version-history":[{"count":4,"href":"https:\/\/fabsk.eu\/blog\/wp-json\/wp\/v2\/posts\/1538\/revisions"}],"predecessor-version":[{"id":1542,"href":"https:\/\/fabsk.eu\/blog\/wp-json\/wp\/v2\/posts\/1538\/revisions\/1542"}],"wp:attachment":[{"href":"https:\/\/fabsk.eu\/blog\/wp-json\/wp\/v2\/media?parent=1538"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fabsk.eu\/blog\/wp-json\/wp\/v2\/categories?post=1538"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fabsk.eu\/blog\/wp-json\/wp\/v2\/tags?post=1538"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}