Redux-toolkit query - Performance issues - redux-toolkit

I have a react-native application.
when using axios it takes me ~0.5ms, while with redux-toolkit query ~2.7ms.
any ideas on how i could optimize this while still be using redux-toolkit query ?
FYI: I'm using createApi.
better performance.

Related

Using MongoDB Atlas with Flutter

I want to create a Flutter mobile application and I want to use MongoDB Atlas as a database. Is there a Flutter package available that can help me with that?
If not, is there any other way I can connect Flutter to a MongoDB Atlas Database? If there isn't, what other options do you suggest?
Thank you in advance.
you can use the package mongo_dart, here is the catch in the database URL give URL to your MongoDB atlas database and you will be able to perform all the crud operations as usual. The documentation is pretty well written so you wouldn't have to face any pro
As #JideGuru said, what you'll want is some form of API that you can then make requests to from your app.
i.e. Instead of accessing your DB directly, you'd do something in Flutter like http.get("yourserveraddress.com/getSomethingWithThisNumber/1") using the HTTP package.
I'd recommend looking at something like Node.JS (https://nodejs.org/), which is a runtime for Javascript that allows it to be ran on servers. I'm just getting started with it and for basic CRUD (Create, read, update, delete) operations on my SQL database its been perfect. I'm not a JS developer by any stretch, but it is easy enough to pick up.
You really should never have your database being directly accessed by a client, as that means leaving it exposed on the internet!
MongoDB have their own driver for NodeJS, I've used it with atlas and it seems solid.
(https://mongodb.github.io/node-mongodb-native/)
Hope this helps!

How to get data from Postgresql database into an angular website?

I have an angular website that needs to show data from a postgresql database.
Is there a way to do it natively within angular or do i have to use an ORM? If ORM needs to be used, any suggestions on the one that can run a long query and return results than just GetAll()?
Thanks in advance!
Angular is front-end technology that has no native way to access your database. You'll need some server side technology that returns JSON from your PostgreSQL database in order to access it from Angular.
This is a decent resource to get you headed in the right direction: https://scotch.io/tutorials/creating-an-angularjs-application-with-sequelize-part-1
In 'first hand' experience I recommending sequelize-typescript as the way to go.
Good luck!

Writing arbitrary mongoDB queries to PHP backend

Im in the start up phase of creating an internal system based on PHP and MongoDB. The users of this system are Javascript programmers and would like to be able to make custom queries to the Mongo database from a frontend gui with arbitrary Mongo shell queries. Of course this would not be a problem at all if I forced them to to write the queries with proper PHP arrays etc, but i would definitely like to avoid this.
I am not quite sure how to approach a feature like this without writing some advanced methods being able to restructure the queries to proper formated arrays that can be used in MongoClient PHP. One approach would be making use of the i.e. MongoDB::execute() method and run the javascript on the database server - a method i don't fancy at all.
Im kindly asking if you have any ideas on how to achieve the requested functionalities to some extend.
Thank you in advance.
Are you looking for something like this : http://rockmongo.com/ ?

looking for a sample of MongoDB benchrun

I would like to run a benchmark using mongodb benchrun that will create a lot of load on the backend storage. and at the same time will be representative of real application workloads.
If somebody has some js code ready, would be appreciated.
You can take a look in MongoDB repository on github - there are multiple performance tests that use benchRun. https://github.com/mongodb/mongo/tree/master/jstests has some in bench_xxx.js files.
You can also look at some sample scripts I have here:
https://github.com/asya999/bits-n-pieces/tree/master/benchRun

Optimize zend framework + Doctrine2 web application

We had an big application written in PHP+js+mysql. some of our bosses, decided (making a big mistake since they are no developers) to give this application in outsourcing for rewritting it from a developer company. They rewritte the application with Zend Framework+ Doctrine, giving us back a very veru very slow application, if in the old application on module to load taked 1 second now it takes 4 seconds.
Till now we have done the impossible to fast up this up: activated cache server, migrate application to linux, caching everything possible but it is still very slow very slow.
I need from all developers experience how to optimize and make faster this application written with zend framework and doctrin2 (we cannot remove doctrine, and we have alreedy implemented the cache system)? tips tricks, ideas any anwser will be welcome.
Same as with any PHP application:
Enable Xdebug on your development machine and do some profiling to see where the bottlenecks are
Enable the MySQL slow query log to see if the queries can be improved
you can also look at the DB profiling features in Zend_Db to see if the app is doing unnecessary queries or loading more data than it needs.
For all website application use this firebug's pluggins for optimize your code, you can really win in performance !
Yahoo Yslow pluggin
Google PageSpeed pluggin
with there, you have a notation for your page, with listing for improve your fastest's application.
After, for Doctrine2 , you can use fetchArray() for few little request, (global, users use fetchAll() ) .
FetchArray is more faster than fetchAll for request, just because fetchArray return just an Array, and fetchAll return all object linked in your request... ( many time, array is sufficient).
Hope I help You.