Comments (5)
@patrick-bigbridge I'm sorry, was quite busy the last weeks. Your change to exec the query only once did the trick for me 👍 Successfully importing all my products in ~30 hours, so I'm closing this issue.
Thank you for your awesome work!
from product-import.
Hi!
It's good that you ask. The query that you mention loads all attribute option values into memory. It's executed once every batch (500 products) in OptionResolver::refresh().
I suspect that executing the query mainly takes a lot of time because all option value data has to be transferred from the database to the PHP process. I think you may have hundreds of thousands of option values. If you execute the query in a mysql client (replacing the '?' by 4) you can see.
There are two types of data that the library reloads every batch: category information and option value information. The reason: it is possible that other processes than the library itself change categories and option values while the importer is running. It seemed like a small overhead. Apparently it is not always so.
I am going to think about a good solution for your problem. In the meanwhile, for my information, can you tell me something about your import: what types of products do you import? Do you import mainly simple attributes or more complex ones as well? How many categories? Do you support multiple store views? And how much time does the complete import currently take? I'd like to collect some reference information. :)
from product-import.
Thanks for your quick answer.
Executing the query in phpmyadmin shows 174097 results in 0.0013s.
Information about the import:
what types of products do you import?
Only simple products
Do you import mainly simple attributes or more complex ones as well?
I have 54 custom attributes, 12 of them select, 5 multiselect
How many categories?
No categories in the import. 1371 categories in the db.
Do you support multiple store views?
No.
And how much time does the complete import currently take?
Can't answer that question precisely. We ran an import without any attributes, just simple products which took about 2 days. Then added the attributes and the import now would take a view weeks.
from product-import.
Thanks for informing me about your import. It helps me to understand your situation better.
You have quite a number of option values, so it takes some time to load them all (I think phpmyadmin adds a limit to the query before executing it). This is reason for me to not load all of them each batch again, but just once. You will still have the slow query (0.6s) once every import, but since it occurs only once this is fine.
I made another change that helps you to import many option values. The library used to create the correct sort_order for each new option. I changed this, because this process takes quite some time (looking up the highest sort_order present for the attribute, in an unindexed column). I fixed this sort order on 10000. This should not cause any problems, but will give some extra speed.
New release is 1.2.3
You may also want to check out this text I just wrote for some tips to speed up an import.
Just let me know if you have any more problems.
from product-import.
@haelbichalex I am just curious how you are doing.
from product-import.
Related Issues (20)
- website_codes restapi HOT 4
- How to use the programming library to import products HOT 3
- Restapi update url issue HOT 15
- Category flat url structure HOT 9
- Image import creates hardlinks HOT 9
- Please provide example of how to use post method with webapi? HOT 11
- Saving product on storeview scope overwrites storeview attribute values with global values HOT 4
- How to set salable quantity ? HOT 5
- Export category attribute values HOT 2
- Trying to get property 'path' of non-object in Model/Resource/Storage/UrlRewriteStorage.php on line 376 HOT 1
- How to set out of stock threshold for backorders ? HOT 4
- Importing library fails after clearing all products HOT 1
- The setSelectAttribute method does not fill swatch input on Text Swatch HOT 3
- Module shouldn't rely on magento2-base package to exist HOT 3
- Fetching Magento configurations isn't working as expected HOT 3
- Generated Url key already exists HOT 1
- Clear Cache after change per product ID HOT 1
- PHP 8 Compatibility HOT 1
- Choose Affected Attribute Set prompt when saving configurable product
- Can't set is_in_stock = 0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from product-import.