? Note: the technical architecture of this historical web game has some problems. at that time, it was always said that it was going to go online, and the modification time was limited. The following is my question about it, comments that can be put forward with limited technical optimization improvements. However, after all, this web game is always requested by the management to be launched soon. in a very limited period of time, it can only be used for minor repairs and minor supplements, and the problem cannot be completely solved, the result is that this web game will never be online ......? If you don't understand the technology, it's just the result of one-sided management from the perspective of marketing ...... ? 2012-02-17 Wooce? 9:54:03? Lib/itemconfig. php? And ?? Lib/missionconfig. php ,? The size is at least MB ,? And the data is actually recorded ......?? So reference their program ,? It takes a lot of time to load them during each execution ...... Php-yellow * 9:59:26? Well, each connection consumes several MB of memory. Wooce? 10:01:34? My thoughts on this optimization are :? Set lib/itemconfig. php? And ?? Lib/missionconfig. php is converted to csv format for storage ,? Then load it into memcache ,? ,? If you want to use their data ,? You only need to read from memcache. Wooce? 10:05:11? So we need to optimize this ,? First, set lib/itemconfig. php? And ?? Lib/missionconfig. php is converted to csv format ,? If you manually edit the changes to csv files one by one, it will be very clumsy and cumbersome ,?? Can I write another simple php program that references lib/itemconfig. php? And ?? Lib/missionconfig. php ,? Then the program is automatically written to the csv in a loop .?? With csv ,? Then read the csv file into memcache. In these two steps, I want Yao to do it ,? Is there a problem? Php-yellow * 10:05:37? Existing in the database Wooce? 10:08:00? Yes ?? Which table? Php-yellow * 10:08:20? Game_item_info Php-yellow * 10:08:28? Game_mission_info Php-yellow * 10:08:47? All these configurations are generated by the database. Wooce? 10:39:53? So ,? Game_item_info table is maintained through GMTool ?? Itemconfig. php is also generated during GMtool maintenance? Php-yellow * 10:54:15? Itemconfig. php is also generated through www/csv/import_csv.php Wooce? 10:55:25? Understand ,? In fact, it was originally csv ,? Then, both itemconfig. php and database are generated through csv import. Php-yellow * 10:55:49? Www/csv/import_csv.php import csv file Wooce? 10:57:21? Well, I found it ,? Game_item_info.csv Wooce? 11:13:35? So ,? You only need to read the ready-made csv into memcache ,? Then add the config that reads item and mission from memcache? The code is enough. Wooce? 11:28:15? This optimization work? Yao * or Huang?
PHP-Liang Yao * 11:59:18? WOCE 11:13:35? So ,? You only need to read the ready-made csv into memcache ,? Then add the config that reads item and mission from memcache? The code is enough.
Do the data of these two files remain unchanged? Php-yellow * 12:01:41? Is it possible to change? Of Php-yellow * 12:02:13? Sometimes there are changes on the planning side Wooce? 13:41:17? Well ,? Can I reload it when necessary? Data in memcache Php-yellow * 13:43:39? You can directly store the configured array to Memcached. PHP-Liang Yao * 14:00:33? I will do the optimization.
WOCE 11:12:32? Oh, how big is $ item? php-yellow * 11:14:51? Case 'create': {the annotation contains the item description php-yellow * 11:29:43? Now there are a lot of php-yellow * 11:29:59 files involving itemconfig? What about new features? wooce 11:30:49? This is a small optimization. if this can't be done, there is not much room for optimization in the current version. php-yellow * 11:31:27? Hmm |