question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Minimize HTTP requests

See original GitHub issue

Hi, and thanks for sharing this module, it’s really helpful.

I have a concern with the way you send the imported records to the backend (using a list of create calls). This is not efficient from a network point of view, and can even be seen as a DoS from the backend.

May I suggest you call a new verb on the dataProvider (something like createMany), and leave the implementation to the developers? That way, if their API allows a single call to create many records, they can optimize the call.

I also have a concern about the create / update choice un the UI. In my opinion, the button should be smarter, and detect the records that are already present (using a getMany), then update those and create the remaining ones. The option in the dialog should disappear, and only be shown if necessary (just like the file copy dialog in your system asks for a confirmation to ignore, update, or stop in that case).

Finally, I suggest that clicking on the “import” button opens the file selector right away. The file format (csv/tsv) can be enforced by a type attribute in the file input, and the presence of an id column can be checked a posteriori.

These limitations are kind of blockers for me. Is there a chance that you implement these in your module, or should I redevelop another module on my side?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
benwindingcommented, Sep 19, 2020

Hi @fzaninotto, @Odonno, We finally have a working alpha release of the new import workflow, let me know what you think!

Try live demo here: https://benwinding.github.io/react-admin-import-csv/#/posts

Peek 2020-09-19 14-50

Try out alpha-release package here npm install react-admin-import-csv/v/1.0.0-alpha.0

All changes are in PR: #27

2reactions
fzaninottocommented, Aug 25, 2020

I’m talking about the file transfer dialog (here, in Windows)

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Reduce Your Website's HTTP Requests
1. Grade your website's performance to find the root problem. · 2. Check how many HTTP requests your site currently makes. · 3....
Read more >
How to Make Fewer HTTP Requests - Neil Patel
1. Figure out which plug-ins are installed and remove those that you don't use. 2. Audit the plug-ins you keep and replace them...
Read more >
How to reduce HTTP requests and speed up your website
How to reduce HTTP requests and speed up your website · 1. Delete unnecessary images · 2. Reduce image size · 3. Implement...
Read more >
How to Make Fewer HTTP Requests in WordPress to Boost ...
How to Optimize and Make Fewer HTTP Requests in WordPress · 1. Remove Unnecessary WordPress Plugins · 2. Replace Heavy Plugins With More ......
Read more >
19 Amazing Ways to Reduce HTTP Requests
Ways To Reduce HTTP Requests of Website and Blog in 2022 · 2. Remove Unnecessary Plugins: · 3. Remove Unused JavaScript and CSS...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found