Slow initial load time?

Currently takes me 7 seconds of scripting to load the data. (did another run and got 4 seconds) Does yjs have problems with initial load time? If so, does YMap and YArray yield faster intial load time than YText?

Btw, I love yjs! Its black magic. You’re amazing Kevin!

The demo site is a special case because it has a live demo of YJS on it. There’s no telling what crazy data anonymous users could be adding to it, minute by minute. This can result in unpredictable ydoc parse times for the demo site. I wouldn’t use it as a benchmark by any means; best to assemble your own benchmarks with your use cases. Yjs is blazing fast in most ordinary cases. :+1:

1 Like

Ah yeah thats true. Legend keeper is looking smashing! How did you guys implement full-text search? Is it done on the client side? Custom implementation?

Fully client-side! Was a little tricky but the results ended up great. Attach a listener/indexer on the desired YDocs and then shove target data into a secondary search index stored on client-side like Fuse, Elasticlunr, or Flexsearch.

1 Like

Thats so awesome!!! I quickly looked at the three client side full-text search libraries, would you agree that Flexsearch is the best one to choose?

Really depends on your needs; lots of data or a little data, create-heavy or update-heavy, static or dynamic search index, etc. They all have different pros and cons. Ultimately I went with Flexsearch due to the speed and amount of data I have to work with, but it’s a bit of nightmare to actually work with. It looks like it got an update recently so maybe it’s better, but when I implemented it, it was an older version that had tons of overloaded functions that didn’t match the documentation. Had to read and modify source code just to get basic stuff working.

1 Like