Replies: 4 comments 3 replies
-
Swoole\Table is suitable for inter-process communication; for a single process, you can just use an array |
Beta Was this translation helpful? Give feedback.
-
https://wiki.swoole.com/en/#/other/issue?id=about-segmentation-fault-core-dump |
Beta Was this translation helpful? Give feedback.
-
I feel that dividing into several small tables and querying them in batches using multiple coroutines offers no benefits because all operations of Swoole\Table are performed in memory, with no I/O switching involved, so launching multiple coroutines is ineffective. |
Beta Was this translation helpful? Give feedback.
-
I think that dividing into several small tables and querying them in batches using multiple coroutines offers no benefits because all operations of Swoole\Table are performed in memory, with no I/O switching involved, so launching multiple coroutines is ineffective. |
Beta Was this translation helpful? Give feedback.
-
Hi. I wanted to check some things on how Tables works and how I could use them. So I made this rough code:
The goal here was to split Table into smaller ones to find relevant row faster when there are hundred of thousands of rows and you need to loop each time to get to the
data
field. After that I wanted to use additional Table for mapping between Table#1 keys and some additional ID.First thing I learned was that there's a lower limit for rows then what's set up in the Table constructor. I guess I get why but I wonder if it's possible to predict it in any way? Or should I simply use
isFull()
?Because I wanted to see if there's any benefit to this splitting, I used
sleep(1)
there but...adding it crashed with dumping core. And I don't know why. Isn't it possible to usesleep
this way?Beta Was this translation helpful? Give feedback.
All reactions