forked from loafle/openapi-generator-original
		
	[Python] pass api_client configuration to model deserialize (#13922)
The if not passed the models create a new configuration object which configures logging and determines cpu count every time. This causes extreme performance issues when deserializing larger sets of items. See also https://github.com/kubernetes-client/python/issues/1921
This commit is contained in:
		
							parent
							
								
									363906fda3
								
							
						
					
					
						commit
						3dc8403e10
					
				| @ -715,6 +715,7 @@ class ApiClient(object): | ||||
|                     value = data[klass.attribute_map[attr]] | ||||
|                     kwargs[attr] = self.__deserialize(value, attr_type) | ||||
| 
 | ||||
|         kwargs["local_vars_configuration"] = self.configuration | ||||
|         instance = klass(**kwargs) | ||||
| 
 | ||||
|         if has_discriminator: | ||||
|  | ||||
| @ -692,6 +692,7 @@ class ApiClient(object): | ||||
|                     value = data[klass.attribute_map[attr]] | ||||
|                     kwargs[attr] = self.__deserialize(value, attr_type) | ||||
| 
 | ||||
|         kwargs["local_vars_configuration"] = self.configuration | ||||
|         instance = klass(**kwargs) | ||||
| 
 | ||||
|         if has_discriminator: | ||||
|  | ||||
| @ -691,6 +691,7 @@ class ApiClient(object): | ||||
|                     value = data[klass.attribute_map[attr]] | ||||
|                     kwargs[attr] = self.__deserialize(value, attr_type) | ||||
| 
 | ||||
|         kwargs["local_vars_configuration"] = self.configuration | ||||
|         instance = klass(**kwargs) | ||||
| 
 | ||||
|         if has_discriminator: | ||||
|  | ||||
| @ -693,6 +693,7 @@ class ApiClient(object): | ||||
|                     value = data[klass.attribute_map[attr]] | ||||
|                     kwargs[attr] = self.__deserialize(value, attr_type) | ||||
| 
 | ||||
|         kwargs["local_vars_configuration"] = self.configuration | ||||
|         instance = klass(**kwargs) | ||||
| 
 | ||||
|         if has_discriminator: | ||||
|  | ||||
| @ -691,6 +691,7 @@ class ApiClient(object): | ||||
|                     value = data[klass.attribute_map[attr]] | ||||
|                     kwargs[attr] = self.__deserialize(value, attr_type) | ||||
| 
 | ||||
|         kwargs["local_vars_configuration"] = self.configuration | ||||
|         instance = klass(**kwargs) | ||||
| 
 | ||||
|         if has_discriminator: | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user