Fork me on GitHub
#fulcro
<
2020-06-14
>
Eric Ihli21:06:43

In what ways does a large database affect Fulcro performance? I have about a megabyte in a database and I'm noticing Fulcro Inspect is taking almost a second to show changes to a form field. Dev tools churns and locks if I try to expand the megabyte table. I expect that. But even with the big table folded, I see slowness. I'll type 5 characters into the field and I'll see Inspect update the form field in the data base 1 character at a time at a rate of about 1 per second. I'm wondering if that is just an artifact of the Inspect tool, or if there is some other performance hit being taken by the actual application that I'm just not noticing yet.

tony.kay23:06:09

Inspect has to serialize the data (it does a diff) to send it to the chrome devtool. The rendering of the original db tab is not well-done for speed. We recently added the db explorer tab, which is much much much faster, allows you to click on idents to navigate, etc. I’d recommend using that with large dbs and never the db tab. As far as performance…see the performance sections of the book. There is no performance problem with a large db per se (clj maps are very very fast). You could be hitting a bug in inspect itself.

Eric Ihli21:06:58

Also, the inspect tool suddenly stopped working with the following error message. I haven't been able to find any change to my app code or to my browser between the time the inspect tool was working to the time I'm seeing these message.

main.js:5553 ERROR [fulcro.inspect.chrome.devtool.main:170] - Error patching state, no previous state available. 538698522
(anonymous) @ main.js:5553
2main.js:5553 ERROR [fulcro.inspect.chrome.devtool.main:170] - Error patching state, no previous state available. 252368074
(anonymous) @ main.js:5553
main.js:2731 Uncaught Jm {message: "No reader function for tag fulcro/tempid.", data: l, Ik: null, name: "Error", description: undefined, …}
After restarting the watcher, server, and browser, I'm now only getting the second error about there being no reader function for fulcro/tempid.

Eric Ihli03:06:49

Clearing all of Chrome's stored data (cache, passwords, etc...) and re-installing the extension fixed it. Well, more accurately, those are some of the steps I took between when I had the problem and when I stopped having the problem.