mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 06:12:25 -05:00 
			
		
		
		
	update go-structr to v0.9.0 with new Timeline{} cache type (#3903)
This commit is contained in:
		
					parent
					
						
							
								6c5d369b05
							
						
					
				
			
			
				commit
				
					
						f30bb549aa
					
				
			
		
					 19 changed files with 1291 additions and 412 deletions
				
			
		
							
								
								
									
										6
									
								
								vendor/codeberg.org/gruf/go-structr/map.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								vendor/codeberg.org/gruf/go-structr/map.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -5,7 +5,7 @@ type hashmap struct { | |||
| 	n int | ||||
| } | ||||
| 
 | ||||
| func (m *hashmap) init(cap int) { | ||||
| func (m *hashmap) Init(cap int) { | ||||
| 	m.m = make(map[string]*list, cap) | ||||
| 	m.n = cap | ||||
| } | ||||
|  | @ -43,6 +43,10 @@ func (m *hashmap) Compact() { | |||
| 	// So we apply the inverse/2, once | ||||
| 	// $maxLoad/2 % of hmap is empty we | ||||
| 	// compact the map to drop buckets. | ||||
| 	// | ||||
| 	// TODO: this is still a relatively | ||||
| 	// good approximation, but it has | ||||
| 	// changed a little with swiss maps. | ||||
| 	if 2*16*diff > m.n*13 { | ||||
| 
 | ||||
| 		// Create new map only big as required. | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue