in looking at https://github.com/jsreport/jsreport/blob/master/packages/odata-to-sql/lib/filter.js
it seems that "ne" notEqual isn't in the list of supported operations.
zewar96
@zewar96
Posts made by zewar96
-
RE: Error on OData
-
Error on OData
We just switched from using fs storage provider to using PostgreSQL. We reimported all of our data and now we are getting this error when sending an odata query
Query:
/odata/folders?$filter=name%20ne%20%27tags%27%20and%20name%20ne%20%27shared%27Error:
{"error":{"code":500,"message":"Cannot read properties of undefined (reading 'toNode')","stack":"TypeError: Cannot read properties of undefined (reading 'toNode')\n at normalizeNode (/app-rprt/node_modules/jsreport-sql-2/lib/node/where.js:27:18)\n at constructor.add (/app-rprt/node_modules/jsreport-sql-2/lib/node/where.js:51:12)\n at constructor.where (/app-rprt/node_modules/jsreport-sql-2/lib/node/query.js:157:22)\n at module.exports (/app-rprt/node_modules/@jsreport/odata-to-sql/lib/filter.js:102:16)\n at module.exports (/app-rprt/node_modules/@jsreport/odata-to-sql/lib/query.js:66:11)\n at Object.query (/app-rprt/node_modules/@jsreport/odata-to-sql/lib/transformer.js:46:14)\n at Cursor.toArray (/app-rprt/node_modules/@jsreport/sql-store/lib/sqlProvider.js:22:29)\n at replay (/app-rprt/node_modules/@jsreport/jsreport-core/lib/main/store/collection.js:53:21)\n at /app-rprt/node_modules/@jsreport/jsreport-core/lib/main/store/collection.js:60:18\n at runMicrotasks (<anonymous>)","target":"/folders?$filter=name%20ne%20%27tags%27%20and%20name%20ne%20%27shared%27","details":[]},"innererror":{}}
Before we rollback, could this be an issue with the provider or do you think it's an issue with our data somehow?
-
RE: Slow Export
ok...sorry i misunderstood. I took your export, added it to my dev environment (clean setup from https://jsreport.net/learn/windows with 1 change to add the license to the config). I then added all of my templates from our test server and did the export of your stuff.
When I exported just your items it took almost 11 seconds. This makes me think that it is doing something disk related to find what it needs and the iteration of the items to get what it needs is causing the slowdown.
When I watch what is happening on my machine in Resource Monitor, i can see that it's processing files on disk and spikes CPU and disk, but doesn't do much at all with memory.
I changed the backend to be PostgreSQL for templates and all of the speed issues have been fixed on the export.
-
RE: Slow Export
Yes that is about right...~300ms
What is the backend file store for this?
-
RE: Slow Export
I was able to do a quick test. There is definitely something weird with our deployed version that I am going to have to figure out. Here are the results from running locally
Export all folders and files 13.3 seconds, 11.3MB file with 1403 total items
(same test as before) Export 3 folders 8.696 seconds, 34Kb file, 17 items
(same test as before) Export 1 temlate 8.673 seconds, 2Kb fileThere are MANY differences in my test though. The deployed version is a docker instance and has shared CPU/RAM and is mounted to an EFS instance. This test was running directly on my laptop with nothing else running. When running this export from the deployed server i see a spike in CPU and RAM, but only to 30% of allocated CPU and 88% of allocated RAM. It's possible the RAM is being throttled and it's using disk swap space, but I don't think so
Do you suspect the issue is CPU related, Memory related, or disk related?
-
RE: Slow Export
I will load a clean instance and export/import the entire structure to something running local and let you know. Unfortunately i will not be able to get to that until tomorrow morning. Thank you for the suggestion. I will let you know the results
-
RE: Slow Export
"store": {
"provider": "fs"
},This mounts to a folder that is a EFS mount within AWS which should have no issues with speed. Just to be sure i checked EFS metrics and you can see 2 small blips which were the 2 exports that i tested with. This caused a 2% usage of the IO limit.
-
Slow Export
The more templates/folders/etc we add, the slower the export function becomes. I wouldn't think that exporting a single folder (with maybe 5 items) would get slower as we add other folders and other templates. There may be some inefficiencies in the export code that need to be reviewed when you guys have some time. For a small example, I just exported 3 folders (a total of 17 items) and it took it almost 2 full minutes to generate a 34Kb .jsrexport file. It never used to take this long, but as we have grown the product and number of reports in our system it has continue to get slower and slower. Another example of why i think it's inefficient is that if i export a single template, it also takes the exact amount of time to export but i end up with a 3Kb file.
-
xlsxAddImage enhancement suggestion
There does not seem to be a way to include alt text when adding an image with this. This is important if you want to ensure accessibility (508 Compliance) on your excel documents.
Not a big deal, but might be nice to add as an optional portion