playcanvas / playcanvas-sync

Real-time synchronization of files between PlayCanvas and your local machine
https://playcanvas.com/
MIT License
75 stars 18 forks source link

Increment asset list request limit #33

Closed zachpeterpaul closed 2 years ago

zachpeterpaul commented 2 years ago

Use a high limit in an asset list api request. The editor does not use a limit at all when it gets its list of assets. pcsync won't work without a limit argument in its request, probably because there's an exception for the editor in the asset server. So we simply pass a high limit here. The problem with pagination seems to be caused by DocumentDb's and Mongos inability to always paginate query results correctly for db tables that are being constantly updated (unless we have an issue in our asset server code). Paginated responses have multiples copies of the same assets, while omitting some others. We are not seeing issues with large projects in the editor, because as mentioned, the editor requests the whole list at once without pagination.