Long text in inverted Flatlist causes huge performance drop on Android

Description
I recently upgraded to react 0.63.2 thanks to the latest Expo SDK 39. I immediately noticed that my most important FlatLists took a huge performance hit on Android (iOs seem unaffected).
After investigating, I found out that it happens when using inverted on a FlatList that contains items with a lot of text (see snack).
The same Flatlist, with the same data, is perfectly smooth when not inverted.
I have yet to test it in production, as the latest Expo SDK is causing trouble that stops me from building the app.
React Native version:
react-native: https://github.com/expo/react-native/archive/sdk-39.0.0.tar.gz => 0.63.2
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.

Create a Flatlist that renders items that contain a lot of text
Set the Flatlist as inverted

Expected Results
The Flatlist should be as smooth when inverted as when normal.
Snack, code example, screenshot, or link to a repository:
https://snack.expo.io/@divone/4c8d68

Just checked it on production and the performance hit is still there, making the app feel laggy.

This issue appears as soon as you invert a ScrollView actually, as you can see on this snack: https://snack.expo.io/@divone/c0c1f3
Again, only visible on a physical Android device.

It seems that the issue only happens on some phones. For me, it happens on a Google Pixel 4 with Android 11.

I see this issue on Pixel4 XL running Android 11, which was working fine on React Native 0.61.5 with Android 10. I notice that when the keyboard is open it does not seem to lag.

Hey @divonelnc thanks for the investigation! I noticed the same issue when running your example.

Facing this issue on a Samsung Galaxy Note10 running Android 11 as well with Expo SDK 39. Didn't happen on Android 10.
Discovered that changing the verticallyInverted style prop from transform: [{scaleY: -1}] to scaleY: -1 in VirtualizedList fixes it.

Facing this issue on a Samsung Galaxy Note10 running Android 11 as well with Expo SDK 39. Didn't happen on Android 10.
Discovered that changing the verticallyInverted style prop from transform: [{scaleY: -1}] to scaleY: -1 in VirtualizedList fixes it.

Experienced this issue as well. I upgraded my Samsung Galaxy S10 from Android 10 to Android 11 and suddenly experienced a noticable lag on the inverted FlatList. @cookiespam 's workaround fixed the problem, however.

Im experience the same issue on android with a Samsung Galaxy s10 Android 11, and i noticed after updated the same issue.

@cookiespam's workaround works. for a less intrusive fix, we could "invert" twice ourselves, once in the container and once in every cell
return (
  <FlatList
    // ...
    style={{scaleY: -1}}
    renderItem={({item}) => {
      return (
        <View style={{scaleY: -1}}>
          {/* cell content */}
        </View
      );
    }}
  >
);

for ios, could just use the official inverted prop. however, that scaleY outside of transform seems undocumented. @cookiespam how did you come up with it? great thanks though

@vinceplusplus
What I did eventually was just simply
  <FlatList
    // ...
    style= {
      Platform.OS === 'android'
       ? { scaleY: -1 } : { transform: [{ scaleY: -1 }] }
    }
  />

same goes for the items inside the flatlist as appropriate.
But I think we can also do something like
  <FlatList
    // ...
    inverted={ Platform.OS === 'ios'}
    style= {
      Platform.OS === 'android'
       && { scaleY: -1 }
    }
  />

@vinceplusplus
I was just trying to invert the FlatList on my own without using the inverted prop and somehow accidentally used scaleY (was googling how to invert something using css) which had been deprecated.

@cookiespam then that was a good accident 👍

I also encounter this issue with my chat screen. It's really hard to find to root cause.

Only happen on Android S10e device.
With inverted FlatList.
FlatList Item contains a Text with any given length.

It's only take 10 items in the list for the performance to be hit really bad.
I'm using @cookiespam bandaid + patch-package to resolve the issue for now now.
Here is the the content of the patch:
react-native+0.63.3.patch
diff --git a/node_modules/react-native/Libraries/Lists/VirtualizedList.js b/node_modules/react-native/Libraries/Lists/VirtualizedList.js
index 9ec105f..a8f1d8c 100644
--- a/node_modules/react-native/Libraries/Lists/VirtualizedList.js
+++ b/node_modules/react-native/Libraries/Lists/VirtualizedList.js
@@ -11,6 +11,7 @@
 'use strict';

 const Batchinator = require('../Interaction/Batchinator');
+const Platform = require('../Utilities/Platform');
 const FillRateHelper = require('./FillRateHelper');
 const PropTypes = require('prop-types');
 const React = require('react');
@@ -2185,9 +2186,14 @@ function describeNestedLists(childList: {
 }

 const styles = StyleSheet.create({
-  verticallyInverted: {
-    transform: [{scaleY: -1}],
-  },
+  verticallyInverted:
+    Platform.OS === 'android'
+      ? {
+          scaleY: -1,
+        }
+      : {
+          transform: [{scaleY: -1}]
+        },
   horizontallyInverted: {
     transform: [{scaleX: -1}],
   },

Wow wow wow thank you guys this fix is a lifesaver !!! 🙏
I was actually trying to replace my FlatList by a ScrollView to see where the issue was coming from and noticed then that without inverting the FlatList the performance was fine.
Now I can keep my FlatList inverted, it works exactly same as before without changing any other props and I'm going from horrible 40-50fps (since updating to Android 11) to butter smooth 90fps 😍
the solution proposed by @vinceplusplus is what I will be using:

return (
  <FlatList
    // ...
    style={{scaleY: -1}}
    renderItem={({item}) => {
      return (
        <View style={{scaleY: -1}}>
          {/* cell content */}
        </View
      );
    }}
  >
);

Is someone considered making a pull request with @cookiespam and @pqkluan's patch? I could make one in a couple of days when I get some free time but I also don't want to steal your moment of glory haha

Facing this issue on a Samsung Galaxy Note10 running Android 11 as well with Expo SDK 39. Didn't happen on Android 10.
Discovered that changing the verticallyInverted style prop from transform: [{scaleY: -1}] to scaleY: -1 in VirtualizedList fixes it for Android, however it does not invert on iOS.

@cookiespam You are legend, worked for me too.

using the scaleY: -1 instead of transform: [{scaleY: -1}] indeed seems to fix the performance issue, BUT (as usual there is a but) the refresh control becomes an issue.
It renders on the top of the screen as you attempt to scroll down and in order to actually scroll you'll need to scroll up then down to "free" the pan responder somehow.

@vinceplusplus
I was just trying to invert the FlatList on my own without using the inverted prop and somehow accidentally used scaleY (was googling how to invert something using css) which had been deprecated.

I think I love you, thank you!

I'd just wanted to drop in and say thank you as well 🙏🏼💙
I was severely confused when I upgraded to Android 11 (on a Redmi Note 8 Pro) and the performance on the chat screen in my app was suddenly horrible. Scrolling for a couple of seconds resulted in 1000+ dropped frames. It was so laggy and jerky that one got almost dizzy by watching it.
Based on your suggestions I've implemented a simple check (with react-native-device-info) so the fix is only applied for android & version >= 11.
const useAndroidInvertedFix = useMemo(
  () => Platform.OS === 'android' && Number(getSystemVersion()) >= 11,
  [],
);

I'm extremely grateful for this workaround, however the underlying issue should be officially addressed by react-native itself, right?
Does anyone know the procedure for doing that or is it enough that this issue gets enough attention? 🤔

@KochMario the best way to get this fix in is by submitting a PR. Unfortunately the team can’t address every issue as most are not a priority. But there is a massive effort right now to evaluate PrS submitted by contributors.

I have been struggling to understand why my chat was lagging when tested on a Samsung S20 ultra with 12gb of RAM while it works prefectly on my xiaomi 9 with just 3GB of RAM. And the comments in this thread helped me fix the issue.
Thanks everyone🎉

I am facing the same issue and have applied the solution here : https://github.com/facebook/react-native/issues/30034#issuecomment-780547496 .  Hoping it does not break anything else. I'll post here if it does 🤞 .

Encountered this issue in a chat scenario (where inverting the list is desirable) and was pulling my hair out why adding text elements to the list was causing scroll perf to tank.
Can confirm that uninverting the list and applying the scaleY workaround fixes scroll perf, but breaks the pull-to-refresh functionality :( may need to do something custom there.
Does anyone have any idea at an Android level why the perf implodes with the default implementation?

Encountered this issue in a chat scenario (where inverting the list is desirable) and was pulling my hair out why adding text elements to the list was causing scroll perf to tank.
Can confirm that uninverting the list and applying the scaleY workaround fixes scroll perf, but breaks the pull-to-refresh functionality :( may need to do something custom there.
Does anyone have any idea at an Android level why the perf implodes with the default implementation?
React Native 0.66 on a Pixel 6 / Android 12.

It was only something I saw on phones using One UI 3 so surprised it's now showing up on Android 12 too

Encountered this issue in a chat scenario (where inverting the list is desirable) and was pulling my hair out why adding text elements to the list was causing scroll perf to tank.
Can confirm that uninverting the list and applying the scaleY workaround fixes scroll perf, but breaks the pull-to-refresh functionality :( may need to do something custom there.
Does anyone have any idea at an Android level why the perf implodes with the default implementation?
React Native 0.66 on a Pixel 6 / Android 12.
edit: between this issue and https://github.com/facebook/react-native/issues/30373 I feel that inverted FlatLists are just completely unusable on Android out-of-the-box - my team will likely need to invest in a custom list control for our chat canvas.

@sfuqua you may want to take a peek at https://github.com/mattermost/mattermost-mobile/blob/master/app/components/post_list/post_list.tsx and https://github.com/mattermost/mattermost-mobile/blob/master/app/components/post_list/post_list_refresh_control.tsx for an inverted list with working refresh control using scaleY: -1

Encountered this issue in a chat scenario (where inverting the list is desirable) and was pulling my hair out why adding text elements to the list was causing scroll perf to tank.
Can confirm that uninverting the list and applying the scaleY workaround fixes scroll perf, but breaks the pull-to-refresh functionality :( may need to do something custom there.
Does anyone have any idea at an Android level why the perf implodes with the default implementation?
React Native 0.66 on a Pixel 6 / Android 12.
edit: between this issue and #30373 I feel that inverted FlatLists are just completely unusable on Android out-of-the-box - my team will likely need to invest in a custom list control for our chat canvas.

@sfuqua you may want to take a peek at https://github.com/mattermost/mattermost-mobile/blob/master/app/components/post_list/post_list.tsx and https://github.com/mattermost/mattermost-mobile/blob/master/app/components/post_list/post_list_refresh_control.tsx for an inverted list with working refresh control using scaleY: -1

Cheers, I'll give that a try - I thought I'd tried that yesterday but may have been applying the wrong style to the RefreshControl.

Bottom refreshControl
For those who want to keep the refresh control at the bottom, you can wrap your flatlist in a view with scaleY:-1 instead of putting the style into the flat list, and invert the items.
return (
<View style={{scaleY: -1}}>
  <FlatList
    // ...
    renderItem={({item}) => {
      return (
        <View style={{scaleY: -1}}>
          {/* cell content */}
        </View
      );
    }}
  />
</View>
);

For me worked the following:
return (
<View style={{transform: [{ scaleY: -1 }]}}>
  <FlatList
    // ...
    renderItem={({item}) => {
      return (
        <View style={{transform: [{ scaleY: -1 }]}}>
          {/* cell content */}
        </View
      );
    }}
  />
</View>
);

The scaleY style does not work on react 0.70.0
https://github.com/facebook/react-native/issues/34607

But transform: [{ rotate: '180deg' }], does the trick!

Worth noting this workaround isn't perfect, since the scroll indicator moves to the other side of the list (from the right to the left). Currently, I disabled the indicator in my application, but this is really not ideal.
The underlying problem here is that scaleY in transform is considerably slower than scaleY outside the transform property on Android for some reason, since scaleY is deprecated and not a web property anyway.

For now, I have written a quick and dirty workaround to restore scaleY like so in my application's index.js file:
// Add scaleY back to work around its removal in React Native 0.70.
import ViewReactNativeStyleAttributes from 'react-native/Libraries/Components/View/ReactNativeStyleAttributes'
ViewReactNativeStyleAttributes.scaleY = true

This allows you to continue using scaleY and avoid the aforementioned issue with the scroll bar being moved to the other side of the FlatList when using rotate instead of scaleY. This works fine in React Native 0.70.x, but might break in the future if support for the property is removed from the native Android View code.

any solution with RN 0.70??
because scaleY StyleSheet is already remove from the package.

Just noting here that we observed that in Android 13 the impact of this is much, much worse than in previous versions of Android, at least in our case (a long list of messages in a chat interface.)
In Android 11 it was not so noticeable and in Android 13 it made the app completely unusable.

Transform
The implementation of transform includes:

Fabric C++ logic included in the Transform.cpp class (for ex. the implementation of Translate)
iOS implementation - Transform.m
Android implementation - BaseViewManager#setTransformProperty, TransformHelper#processTransform and for the translationX property the AOSP method View#setTranslationX

https://developer.android.com/reference/android/view/View#setScaleX(float)

[
 Sx 0  0  0
 0  Sy 0  0
 0  0  Sz 0
 0  0  0  1
]

A negative value (scaleY: -1) results in a point reflection in that dimension. The value 1 has no effect.
In geometry, a point reflection or inversion in a point (or inversion through a point, or central inversion) is a type of isometry of Euclidean space.

Original: Tomruen Vector: KCVelaga
Related Transformation Matrix on Wikipedia, Scale Transformation, scale() on mdn docs https://github.com/facebook/react-native/issues/30373#issuecomment-1173649280

Related issue: https://github.com/facebook/react-native/issues/35350

In case it's helpful to anybody, here's the latest that's necessary for an inverted list to play nice on Android 13 with React Native 0.70: https://phab.comm.dev/D6193

In case it's helpful to anybody, here's the latest that's necessary for an inverted list to play nice on Android 13 with React Native 0.70: https://phab.comm.dev/D6193

Thank you! I have been struggling with this for the last few weeks! Thanks for putting in one place! It works great!

Also this issue could be fixed by also adding scaleX: -1 in addition to scaleY: -1 for container and every view.
https://github.com/facebook/react-native/issues/35350#issuecomment-1317465434

Patch for RN 0.67.5 is here. Thanks for @pqkluan https://github.com/facebook/react-native/issues/30034#issuecomment-806396274
react-native+0.67.5.patch
diff --git a/node_modules/react-native/Libraries/Lists/VirtualizedList.js b/node_modules/react-native/Libraries/Lists/VirtualizedList.js
index 2648cc3..a7e9f18 100644
--- a/node_modules/react-native/Libraries/Lists/VirtualizedList.js
+++ b/node_modules/react-native/Libraries/Lists/VirtualizedList.js
@@ -9,6 +9,7 @@
  */

 const Batchinator = require('../Interaction/Batchinator');
+const Platform = require('../Utilities/Platform');
 const FillRateHelper = require('./FillRateHelper');
 const ReactNative = require('../Renderer/shims/ReactNative');
 const RefreshControl = require('../Components/RefreshControl/RefreshControl');
@@ -2118,9 +2119,14 @@ function describeNestedLists(childList: {
 }

 const styles = StyleSheet.create({
-  verticallyInverted: {
-    transform: [{scaleY: -1}],
-  },
+  verticallyInverted:
+    Platform.OS === 'android'
+      ? {
+        scaleY: -1,
+      }
+      : {
+        transform: [{scaleY: -1}]
+      },
   horizontallyInverted: {
     transform: [{scaleX: -1}],
   },

What about RN 0.71? Same issue?

any workarounds for react-native 0.71?

@MayheMatan try this
index.js (in your app)
import ViewReactNativeStyleAttributes from 'react-native/Libraries/Components/View/ReactNativeStyleAttributes';
ViewReactNativeStyleAttributes.scaleY = true;

Then patch RN 0.71 (react-native+0.71.1.patch)
diff --git a/node_modules/react-native/Libraries/Lists/VirtualizedList.js b/node_modules/react-native/Libraries/Lists/VirtualizedList.js
index 2629142..4e60aad 100644
--- a/node_modules/react-native/Libraries/Lists/VirtualizedList.js
+++ b/node_modules/react-native/Libraries/Lists/VirtualizedList.js
@@ -29,6 +29,7 @@ import {findNodeHandle} from '../ReactNative/RendererProxy';
 import flattenStyle from '../StyleSheet/flattenStyle';
 import StyleSheet from '../StyleSheet/StyleSheet';
 import clamp from '../Utilities/clamp';
+import Platform from '../Utilities/Platform';
 import infoLog from '../Utilities/infoLog';
 import {CellRenderMask} from './CellRenderMask';
 import ChildListCollection from './ChildListCollection';
@@ -1840,9 +1841,7 @@ export default class VirtualizedList extends StateSafePureComponent<
 }

 const styles = StyleSheet.create({
-  verticallyInverted: {
-    transform: [{scaleY: -1}],
-  },
+  verticallyInverted: Platform.OS === 'android' ? { scaleY: -1 } : { transform: [{scaleY: -1}] },
   horizontallyInverted: {
     transform: [{scaleX: -1}],
   },

Same problem for 0.71.2

@claudiozam it helps but only with a flat list (+JS drops to 30fps) but if using flashlist then UI and JS drops to 30fps :(

@devoren Flatlist is faster than Flashlist inverted.....

@claudiozam idk what do you mean?

For now, I have written a quick and dirty workaround to restore scaleY like so in my application's index.js file:
// Add scaleY back to work around its removal in React Native 0.70.
import ViewReactNativeStyleAttributes from 'react-native/Libraries/Components/View/ReactNativeStyleAttributes'
ViewReactNativeStyleAttributes.scaleY = true

This allows you to continue using scaleY and avoid the aforementioned issue with the scroll bar being moved to the other side of the FlatList when using rotate instead of scaleY. This works fine in React Native 0.70.x, but might break in the future if support for the property is removed from the native Android View code.

This saved my day

solution

For me, it does solve the fps drop issue but the scrolling becomes quite janky. If I try to scroll fast, it would either stop abruptly, go in the opposite direction or scroll very unevenly. Is anyone else facing a similar issue?

I also encounter this issue with my chat screen. It's really hard to find to root cause.

Only happen on Android S10e device.
With inverted FlatList.
FlatList Item contains a Text with any given length.

It's only take 10 items in the list for the performance to be hit really bad.
I'm using @cookiespam bandaid + patch-package to resolve the issue for now now.
Here is the the content of the patch:
react-native+0.63.3.patch
diff --git a/node_modules/react-native/Libraries/Lists/VirtualizedList.js b/node_modules/react-native/Libraries/Lists/VirtualizedList.js
index 9ec105f..a8f1d8c 100644
--- a/node_modules/react-native/Libraries/Lists/VirtualizedList.js
+++ b/node_modules/react-native/Libraries/Lists/VirtualizedList.js
@@ -11,6 +11,7 @@
 'use strict';

 const Batchinator = require('../Interaction/Batchinator');
+const Platform = require('../Utilities/Platform');
 const FillRateHelper = require('./FillRateHelper');
 const PropTypes = require('prop-types');
 const React = require('react');
@@ -2185,9 +2186,14 @@ function describeNestedLists(childList: {
 }

 const styles = StyleSheet.create({
-  verticallyInverted: {
-    transform: [{scaleY: -1}],
-  },
+  verticallyInverted:
+    Platform.OS === 'android'
+      ? {
+          scaleY: -1,
+        }
+      : {
+          transform: [{scaleY: -1}]
+        },
   horizontallyInverted: {
     transform: [{scaleX: -1}],
   },

For me, it does solve the fps drop issue but the scrolling becomes quite janky. If I try to scroll fast, it would either stop abruptly, go in the opposite direction or scroll very unevenly. Is anyone else facing a similar issue?

Throwing a transform style on the flatlist and children of scaleY: -1 also had performance issues for us. However, rotating the list and children 180deg didn't seem to have the same problem and kept the "inverted" functionality.

Still facing this in 0.71. This is an issue for all chat-like applications

Still facing this in 0.71. This is an issue for all chat-like applications

+1

+1
I even tried to use Animated Section List instead of chat list and still facing the same issue with inverted.

I have a problem that any inverted list on Android slows down when scrolling. It's not freezing, it's the touch processing. If I try to scroll quickly with my finger, I can't do it. I don't have this problem on a non-flipped list, though. The same problem in ScrollView.

still problem in react native 0.71.8, so sad

In React Native 0.72.3 the issue persist. Now the VirtualizedList is in another location @react-native/virtualized-lists/List

npx patch-package @react-native/virtualized-lists
<EMAIL_ADDRESS>diff --git<EMAIL_ADDRESS><EMAIL_ADDRESS>index 8a23e81..b2be91a 100644
---<EMAIL_ADDRESS>+++<EMAIL_ADDRESS>@@ -23,6 +23,7 @@ import type {
   RenderItemType,
   Separators,
 } from './VirtualizedListProps';
+import Platform from '../Utilities/Platform';

 import {
   RefreshControl,
@@ -2056,9 +2057,7 @@ class VirtualizedList extends StateSafePureComponent<Props, State> {
 }

 const styles = StyleSheet.create({
-  verticallyInverted: {
-    transform: [{scaleY: -1}],
-  },
+  verticallyInverted: Platform.OS === 'android' ? { scaleY: -1 } : { transform: [{scaleY: -1}] },
   horizontallyInverted: {
     transform: [{scaleX: -1}],
   },

In react native versions 0.71+ to stop performance drop on Android turn off inverted FlatList and add this : style={{transform: [{rotate: '180deg'}]}}, also in add this style in renderItem that is in flat list., also add this if you want to add scroll bar on the right side you can use showsVerticalScrollIndicator={false}. This fixed our chat app where we  had lag on many android device when we have 10k char messages.

@Andrija00 dont do this, instead of styles flatlist and component just styles flatlist 1 time by:
diff --git<EMAIL_ADDRESS><EMAIL_ADDRESS>index 8a23e81..ca17f79 100644
---<EMAIL_ADDRESS>+++<EMAIL_ADDRESS>@@ -30,6 +30,7 @@ import {
   View,
   StyleSheet,
   findNodeHandle,
+  Platform,
 } from 'react-native';
 import Batchinator from '../Interaction/Batchinator';
 import clamp from '../Utilities/clamp';
@@ -2056,9 +2057,7 @@ class VirtualizedList extends StateSafePureComponent<Props, State> {
 }

 const styles = StyleSheet.create({
-  verticallyInverted: {
-    transform: [{scaleY: -1}],
-  },
+  verticallyInverted: Platform.OS === 'android' ? { scaleY: -1 } : { transform: [{scaleY: -1}] },
   horizontallyInverted: {
     transform: [{scaleX: -1}],
   },

@Andrija00 dont do this, instead of styles flatlist and component just styles flatlist 1 time by:
diff --git<EMAIL_ADDRESS><EMAIL_ADDRESS>index 8a23e81..ca17f79 100644
---<EMAIL_ADDRESS>+++<EMAIL_ADDRESS>@@ -30,6 +30,7 @@ import {
   View,
   StyleSheet,
   findNodeHandle,
+  Platform,
 } from 'react-native';
 import Batchinator from '../Interaction/Batchinator';
 import clamp from '../Utilities/clamp';
@@ -2056,9 +2057,7 @@ class VirtualizedList extends StateSafePureComponent<Props, State> {
 }

 const styles = StyleSheet.create({
-  verticallyInverted: {
-    transform: [{scaleY: -1}],
-  },
+  verticallyInverted: Platform.OS === 'android' ? { scaleY: -1 } : { transform: [{scaleY: -1}] },
   horizontallyInverted: {
     transform: [{scaleX: -1}],
   },

I see but I am not using Expo or Virtualized List. I am using basic flatList from React Native and rotate will fix the issue. Thanks for help!

VirtualizedList is the base component that FlatList uses to implement the list.

@Andrija00 are you check using FlashList for you chat (10k char messages)?

@hannojg do you have any idea when it will go out?
or should I use main branch?
Looks like ViewReactNativeStyleAttributes.scaleY = true; does not work anymore on 0.72 with new arch - just updated ;/

@anatooly We had issues using FlashList in the past for your ChatScreen component so we stick with FlatList

@hannojg great work!! 💪 😍

The fix is part of RN 0.72.4, you can upgrade and test 😊

Perhaps this issue should be closed?

if anyone can confirm that it's fixed I'd be happy to close

Unfortunately for me updating did not resolve the issue. On Samsung S23 Ultra Android 13, when removing the inverted prop, FlatList behaves perfectly fine as it should, running at smooth 120fps. Adding the inverted prop sporadically brings the fps down to 0.5 and a lot of frame drops. After updating to RN 0.72.4 it seemed liked the issue "improved" at first, but after 20 seconds of scrolling, same performance drop again.

 By using FlatList the issue does indeed seem to be fixed, although now the scroll indicator is on the left.

@daidonpah Are you suer your flatlist doesn't have any custom styles? Because that may cause the wrong position of the scrollbar.
If you don't, are you able to reproduce in a clean new app? If so, I think I'd be good to open a new issue 😊

@daidonpah Have you solved the issue using FlashList?

Looks like the performance issue is fixed with v0.72.4 with this line using {transform: [{scale: -1}]} not scaleY.
Thank you for the fix @hannojg
I'm using Expo 48 and it uses "react-native": "0.71.14" so I had to patch myself.
This will hide the scrollbar for Android, but better than huge performance drop while I wait to update RN.
const styles = StyleSheet.create({
  inverted: {
    ...Platform.select({
      android: {
        transform: [{ scale: -1 }],
      },
    })
  }
});

...

return (
  <FlatList
    // inverted={true} on Android 33+ will cause performance issue
    inverted={Platform.OS === 'ios'}
    // apply the inverted style on android
    style={styles.inverted}
    // hide the scroll indicator on android because it shows on the left
    showsVerticalScrollIndicator={Platform.OS === 'ios'}
    listFooterComponent={
      <View style={styles.inverted}>
        <Header/>
      </View>
    }
    renderItem={({ item }) => {
      return (
        <View style={styles.inverted}>
          {renderItem(item)}
        </View>
      )
    }}
  />
);

@foloinfo on earlier versions this workaround works without compromising the scrollbar:
https://github.com/facebook/react-native/issues/30034#issuecomment-780547496
https://github.com/facebook/react-native/issues/30034#issuecomment-1277360480

Not stale!

Keep this open amigo

This issue has been fixed in recent versions of React Native unless you are still experiencing it, in which case it may be more appropriate to open a new issue

The fix is part of RN 0.72.4, you can upgrade and test 😊


Make an arbitrary change to readme to test the CI and verify that samples build as expected.

@danewalton, @RickWinter - it looks like certain samples no longer build/compile as part of CI.
I am guessing this might be related to the recent directory restructuring: https://github.com/Azure/azure-sdk-for-c/pull/830
For example, I broke keys_client_example.c by removing a semi-colon and yet all the CI legs are passing (including *_with_samples ones).

Closing, not relevant anymore.
The CI does build and fail for keyvault, but does not build the samples within keyvault. That is expected.


Add 2048 by @danqing

[x] Project URL: https://github.com/danqing/2048
[x] Update contents.json instead of README
[x] One project per pull request
[x] Project added at the end of the list (a script sorts projects automatically)
[x] Avoid iOS or open-source in description as it is assumed
[x] Use this commit title format if applicable: Add app-name by @github-username
[x] Use approved format for your entry

Thank you for contributing to open-source-ios-apps 😉


Investigate display timeout variability

The display timeout isn't completely reliable.
The timers in ESP-IDF are being re-worked - save this for that.

Should be improved by fed9875488e7a39481a043a3c1642fb1f9aeb7d6. Still not perfect though.

Maybe we can close this after ce2749abe49fa64bd255a916d89fd95876c46fe8?


Add github action for syncing

Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits.
:memo: Please follow instructions in the contributing guide to update your commits with the DCO
Full details of the Developer Certificate of Origin can be found at developercertificate.org.
The list of commits missing DCO signoff:

d8fe276 Add github action for syncing

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: MarcelMue
To complete the pull request process, please assign leogr after the PR has been reviewed.
You can assign the PR to them by writing /assign @leogr in a comment when ready.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Welcome @MarcelMue! It looks like this is your first PR to falcosecurity/charts 🎉

Wrong repo - supposed to go into our fork :facepalm:


TypeError: query.trim is not a function

Hi,
I am trying to use graphql.js inside the Google Cloud Functions to query my database through a Graphql interface.
However when I try to set the URL, I get this error:
textPayload: "TypeError: query.trim is not a function
    at Object.helper (/srv/node_modules/graphql.js/graphql.js:425:80)
    at GraphQLClient.that.(anonymous function) [as query] (/srv/node_modules/graphql.js/graphql.js:442:23)
    at listAggregators (/srv/lib/intents/location-permission.js:17:54)

Here is my code:
const graphql = require('graphql.js');

function listAggregators(conv: DialogflowConversation) {
  const graph = graphql('https://graphql.staging.mygraphq.com/graphql');
 // [...]
}

Should I set some extra parameters here?
Note: I am using typescript, instead of javascript. Maybe there is some compiler option that I should set, because I also get a compile error when I try to use import instead of require in import graphql from 'graphql.js';
Thanks,
Komyg

Did u get any lead regarding this query, Iam also facing same issue


JSON deserializer broken.

Source/destination types
// Put the types you are serializing or deserializing here

Object, placeholder from https://www.newtonsoft.com/json
Source/destination JSON
{"message":"Place your serialized or deserialized JSON here"}

string json = @"{
'Name': 'Bad Boys',
'ReleaseDate': '1995-4-7T00:00:00',
'Genres': [
'Action',
'Comedy'
]
}";
Expected behavior

I'd like to print Name in to console.
Actual behavior
Should display Bad Boys

Showed up nothing.
Steps to reproduce
// Your calls to Newtonsoft.Json here

My code
So after running app, you should see name Bad Boys in the console app, but instead of it to be showed up, nothing being echoed on.
`using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace ConsoleApp2
{
class Program
{
static void Main(string[] args)
{
string json = @"{
'Name': 'Bad Boys',
'ReleaseDate': '1995-4-7T00:00:00',
'Genres': [
'Action',
'Comedy'
]
}";
        Movie m = JsonConvert.DeserializeObject<Movie>(json);

        string name = m.Name;
        Console.WriteLine(name);
        System.Threading.Thread.Sleep(5000);
    }
}

internal class Movie
{
    public string Name { get; internal set; }
    public string ReleaseDate { get; internal set; }
}

}
`

Internal types or members are accessible only within files in the same assembly. Just remove the internal


SSE and WS handlers get into an error handling loop on disconnect

When an SSE connection disconnects ungracefully, the next call of GraphQLSseHandler.writeResult will fail because of a broken pipe. This is expected.
However, the error handling in GraphQLSseHandler now gets into an infinite loop, where the error handling tries to write a message, fails again, and handles that failure the same way.
The publisher will never complete and keep emitting values.
I have a possible fix in this PR, which explicitly disposes the subscription on IOException.
Feel free to drop this PR for an alternative fix.
Note that I have not tested with Webflux, which has its own version of the SSEHandler.
To reproduce:
@Controller
public class SseDatafetcher {
    @SchemaMapping(typeName = "Subscription")
    public Flux<Long> example() {
        return Flux.interval(Duration.ofSeconds(1), Duration.ofSeconds(1))
                .doOnError(e -> System.out.println("Error"))
                .doOnCancel(() -> System.out.println("Cancel"))
                .onErrorComplete();
    }
}

And then curl:
 curl -X POST -N  -H "Content-Type: application/json" -H "Accept: text/event-stream" -d '{"query": "subscription { example }"}' http://localhost:8080/graphql  -i

This will start printing results. The error loop happens when the curl is cmnd-c-ed.

Thanks for catching this @paulbakker !


feat: Onboard America Health Rankings Dataset

Description

datasets/america_health_rankings/ahr

Based on #
Note: It's recommended to open an issue first for context and discussion.
Checklist
Note: Delete items below that aren't applicable to your pull request.

[x] Please merge this PR for me once it is approved.
[x] If this PR adds or edits a dataset or pipeline, it was reviewed and approved by the Google Cloud Public Datasets team beforehand.
[x] If this PR adds or edits a dataset or pipeline, I put all my code inside  datasets/america_health_rankings and nothing outside of that directory.
-[ ] This PR is appropriately labeled.

Please address Python linter errors


Title field of error dialog is too small in macOS

This can be clearly seen in the following image:

@juanis2112, this field is defined here:
https://github.com/spyder-ide/spyder/blob/master/spyder/widgets/reporterror.py#L158
I don't know exactly how to do this, but QLineEdit has several methods to define its size (e.g. setMinimumWidth or setMaximumWidth). You can find the full list here:
http://doc.qt.io/qt-5/qlineedit-members.html
I'm sure one of them will allow us to set the QLineEdit width to expand to the size of the report error dialog.

Maybe another way to address this would be to explicitly set the FieldGrowthPolicy of the QFormLayout to QFormLayout.ExpandingFieldsGrow. By default, it is set to FieldsStayAtSizeHint for MacOS.
If you still want to go with the setMinimumWidth, I suggest to calculate the width with QFontMetrics instead of harcoding a value.

Thanks for the tip @jnsebgosselin!


fix BusyBox sed

BusyBox sed works the same way as GNU sed

What this PR does / why we need it:
Code completion for zsh under alpine is not working currently because BusyBox sed is not identified as a GNU sed.
This leads to
LWORD='[[:<:]]'
RWORD='[[:>:]]'
which is not working in BusyBox sed
same as #6327
Special notes for your reviewer:
If applicable:

[ ] this PR contains documentation
[ ] this PR contains unit tests
[ ] this PR has been tested for backwards compatibility

/cc @marckhouzam

@hickeyma LGTM.  Regressions tests, including new ones added for this PR pass.


Allow the Catch function to pass the error along as an optional parameter

Describe the Bug
Feature Request: The Catch() function for each page works correctly as an error boundary, however the error is simply logged to the console, giving no insight as to what the error was on the screen or in the logs.
export function Catch() {   return <Oops />; }
would be more useful if to do
export function Catch(e) {   return <Oops error={e.message} />; }
Generouted Version
1.19.6
Your Example Website or App or Reproduction
N/A
Steps to Reproduce the Bug or Issue

Force an error to occur
Note the error is logged in the console
Note the error is caught by the Catch() error boundary
Note there is no way to access the error/stacktrace

Expected Behavior
As a user, I expected to be able to access the error object within the Catch() block, but I am not able to
Screenshots or Videos
No response
Platform

OS: macOS
Browser: Chrome

Additional context
No response

@danfedericoadc You can use the useRouteError hook from react-router to get access the error details.
FYI, the way you described is available at the Solid Router integration as its ErrorBoundary supports that.
Hope that helps!


Attempts to attach methods to records result in an error message meant for objects

Consider the following:
type Person record {|
    int age = 9;
    string name = "default first name";
|};

function Person.getName() returns string {
    return self.name;
}

The above gives the following errors:
cannot attach function 'getName' to record type 'Person'
outside object method definitions are not allowed
undefined symbol 'self'

Need to generify the second of the above error messages.

Depends on https://github.com/ballerina-platform/ballerina-lang/issues/18178.


If container cannot be started (stuck in created state) the state transition will be stuck forever

This happens when for example the entrypoint.sh is missing, or the entrypoint cannot be run

Fixed with 80fee1893af40424db493aa8b38e7a1328b24ac4


feat(pullover): hotfix to beta/v0.7.0

Description
https://github.com/autowarefoundation/autoware.universe/pull/2667
https://github.com/autowarefoundation/autoware.universe/pull/2669
https://github.com/autowarefoundation/autoware.universe/pull/2673 (not yet)
Hotfix to beta/v0.7.0

Related links
https://github.com/autowarefoundation/autoware.universe/pull/2667
https://github.com/autowarefoundation/autoware.universe/pull/2669
https://github.com/autowarefoundation/autoware.universe/pull/2673

Tests performed
As written in each PR.

Notes for reviewers

Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.

[x] I've confirmed the contribution guidelines.
[x] The PR follows the pull request guidelines.

In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.

[x] The PR follows the pull request guidelines.
[x] The PR has been properly tested.
[ ] The PR has been reviewed by the code owners.

Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.

[ ] There are no open discussions or they are tracked via tickets.
[ ] The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

Codecov Report

:exclamation: No coverage uploaded for pull request base (beta/v0.7.0@cebd7cc). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@              Coverage Diff              @@
##             beta/v0.7.0    #247   +/-   ##
=============================================
  Coverage               ?   3.08%
=============================================
  Files                  ?      68
  Lines                  ?    8011
  Branches               ?    3846
=============================================
  Hits                   ?     247
  Misses                 ?    7552
  Partials               ?     212

Flag
Coverage Δ

differential
3.08% <0.00%> (?)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Edns ecs

Hi Frank, as discussed, proposal to include EDNS Client Subnet option data in query packet, let me know what you think.

Clientsubnet information can already sent by the client, so we should just use that information.
For serve-stale, if we won't have an entry for the client subnet, maybe we should return a cached entry without clientsubnet if there is one instead of an error.


Provide a nuget package to allow easy restore in projects.

I generally in my projects have all my dependencies managed by nuget, so they're automatically restored on build and do not have to be included in the repository. It would be great if BulletSharp could also get a nuget package so I can use it in the same way.

+1

NuGet doesn't play nicely with platform-dependent assemblies yet:
http://nuget.codeplex.com/workitem/679
Looks like they're fixing this in NuGet 3.0. Until then I won't bother hacking around it.

Hi there!
Are there any news about the nuget package? :smile:
Regards.

Hi!
I'm thinking of putting up the PInvoke version of BulletSharp since it's cross-platform and getting more and more stable.
What I haven't figured out is how to copy the right version of libbulletc.dll to the output directory based on the target platform (x86, x64, AnyCPU).

Maybe this could help you:

https://github.com/NuGetPackageExplorer/NuGetPackageExplorer

Thanks, René! That made things a lot easier.
BulletSharp PInvoke is now on nuGet: https://www.nuget.org/packages/BulletSharp/
The solution to copying libbulletc.dll was to use a .targets file.

Nice work! I'll use it :wink:


proposal: cmd/vet: time.Time should not compared

background
Time is hard and time.Time is really great in most all cases, but between the two issues (#45958 #45960) I came across recently, it seems like anything that does a runtime equality check is probably a bug. Please let me know if there are cases where comparing time is good, safe, and necessary.
summary
As such, it seems reasonable to add a vet check to disallow using time.Time like so:
if time.Time{} == time.Time{} {}
map[time.Time]struct{}{{}: {}}

alternatives
I support enforcing this via the complier, but I get the impression that is a non starter:
package time

type Time struct {
	_    [0]func()
	wall uint64
	ext  int64
	loc  *Location
}

We could also add a new symbol that is intentionally comparable, say time.Comparable, but it would be somewhat confusing when to use which one, and that would probably involve a go vet rule too.

related #22978

the related ticket does not speak to equality, I would be happy to discuss that scope, since it appears to have been messed before.

Given the possible confusion people may have, now I am inclined to have a checker for this. Typically, the == case should be replaced by Equal(), as described in Equal. The map case is trickier, as it requires non-trivial code changes.
The remaining problem is whether the incoming StaticCheck suggestion is sufficient, or we need to go deeper, e.g. see whether the Time object comes from time.Now,  time.Date, and so on.
In addition, what I am thinking now is whether this can be generalized to other data types than just Time. Such a checker will analyze whether a "Equal" function is defined on a data type, if so then it will discourage (1) using ==, (2) using the data type as a map key, and (3) any other place equality check uses the default struct comparison. If so this could be a good vet checker.

The docs make clear that it is perfectly fine to use time.Time with == and in map keys provided you do it correctly.
I don't see how a checker can tell whether you are doing it correctly, and if it can't, then it will have too many false positives (or no reports).

This proposal has been added to the active column of the proposals project
and will now be reviewed at the weekly proposal review meetings.
— rsc for the proposal review group

I don't see how a checker can tell whether you are doing it correctly, and if it can't, then it will have too many false positives (or no reports).

After @ianlancetaylor 's comment about time.Date, I think this would require showing a flow from a known "bad for equality" source like time.Now() into an == without modification to the Time like UTC(). This is a fairly considerable step up in difficulty compared to warning on every == on type time.Time and will warn on a lot less stuff.

In addition, what I am thinking now is whether this can be generalized to other data types than just Time. Such a checker will analyze whether a "Equal" function is defined on a data type, if so then it will discourage (1) using ==,

Without knowing more about the relationship of == and Equal on that type, this sounds like it will have too many false positives.

I think we have established that there are cases where experienced developers can use == and map[time.Time] safely, and honestly that was never really in question. The fact that this is so non-trivial and unintuitive, means (I feel) we should do something to help developers out, as many appear to have not fully understood the docs. Why did we even make a single time symbol that embeds wall clock, monotonic, and location based time information, if not to create one one a simple, easy to use interface.

Based on the discussion above, this proposal seems like a likely decline.
— rsc for the proposal review group

if we are not pursuing this avenue, what is the suggested resolution to the meta issue "time.Time is hard to use"? I am happy to start an out of band discussion or look into alternatives, but it suggesting people rtfm does not appear to be working.

what is the suggested resolution to the meta issue "time.Time is hard to use"?

I'm not sure, but see also #20757 (which is basically “time.Duration is hard to use correctly”).

No change in consensus, so declined.
— rsc for the proposal review group

No change in consensus, so declined.
— rsc for the proposal review group


Multilanguage

How do you change Days, hours ... in other language.

You can make custom content like that.
text: any = { "Weeks": "Weeks",
"Days": "Days", "Hours": "Hours",
Minutes: "Minutes", "Seconds": "Seconds",
"MilliSeconds":"MilliSeconds" };
Change Default Text


UI and API

Please review n comment

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


vector::_M_range_check @ "SELECT 1 FROM a.b WHERE 1 = 1 AND 1"

~/tmp/uSQL4CC/examples/sqlparse $ unix/sqlparse
usql> SELECT 1 FROM a.b WHERE 1 = 1 AND 1
terminate called after throwing an instance of 'std::out_of_range'
what():  vector::_M_range_check
Aborted

There's a underflow in SQLNodeList.cpp (line 81).
I simply replace the "size_t" to "long long" and it works.


Revert "feat: Add PaymentStatus method for checking payment status"

Reverts dwivedianuj9118/phonepe-payment-gateway#2
issue

Code have error


Support fuzzy search in postgres search backend

This adds fuzzy search through trigrams to Postgres search backend
Please check the following:

[ ] Do the tests still pass?[^1]
[x] Does the code comply with the style guide?

[x] Run make lint from the Wagtail root.

[ ] For Python changes: Have you added tests to cover the new/fixed behaviour?
[ ] For front-end changes: Did you test on all of Wagtail’s supported environments?[^2]

[ ] Please list the exact browser and operating system versions you tested:
[ ] Please list which assistive technologies [^3] you tested:

[ ] For new features: Has the documentation been updated accordingly?

Please describe additional details for testing this change.
[^1]: Development Testing
[^2]: Browser and device support
[^3]: Accessibility Target

why closed? how to support fuzzy in wagtail now?


CNInvalid authentication

garmin fenix5 APAC CN
use email and password
show Invalid authentication

tested with version 0.2.16， still show Invalid authentication.
I tried modifying  the file (custom_components/garmin_connect/init.py) Line 67: change the self.in_china = True , reboot HA, It still show Invalid authentication

@douglasleft The integration check for certain Country selected and set the correct value (if you run one of the latest versions) Can you tell me which one you have selected?
I cannot verify if something changed, it could be that Garmin changed something in their API which stopped it from working, or something er is wrong (temp block on your Garmin Connect account or something like that...

config-general -  certain country   中国 （China），I can log in to my account at https://connect.garmin.cn/

Ok, I have a workaround for this. Modify line 43 of config_flow.py, change:
api = Garmin(username, password)
to
api = Garmin(username, password, True)
It worked for me.

Ok, I have a workaround for this. Modify line 43 of config_flow.py, change: api = Garmin(username, password) to api = Garmin(username, password, True)
It worked for me.

Thanks，It worked~


Example fails

Installed by mamba, using cuda10.1, running openbpmd.py in the examples directory with no other options given produces and error:
(base) ../../bin/openbpmd.py
Minimizing...
Equilibrating...
/programs/x86_64-linux/openbpmd/1.0.0/lib/python3.7/site-packages/MDAnalysis/coordinates/base.py:892: UserWarning: Reader has no dt information, set to 1.0 ps
warnings.warn("Reader has no dt information, set to 1.0 ps")
Traceback (most recent call last):
File "../../bin/openbpmd.py", line 576, in
main(args)
File "../../bin/openbpmd.py", line 122, in main
args.structure, args.hill_height)
File "../../bin/openbpmd.py", line 468, in produce
properties)
File "/programs/x86_64-linux/openbpmd/1.0.0/lib/python3.7/site-packages/simtk/openmm/app/simulation.py", line 105, in init
self.context = mm.Context(self.system, self.integrator, platform, platformProperties)
File "/programs/x86_64-linux/openbpmd/1.0.0/lib/python3.7/site-packages/simtk/openmm/openmm.py", line 18608, in init
this = _openmm.new_Context(*args)
Exception: CustomCentroidBondForce: Weights for group 0 add to 0

This is typically what I see when the code fails to find anchor atoms. Add this line after line 439 in openbpmd.py:
print(lig_ha_idx, anchor_atom_idx)
What does it print?

Thanks for the quick reply. We are trying to install this for users but are not interested in making changes. We will put this on the back burner until another release is made or a fix is implemented.
Jim
James Vincent, PhD
Bioinformatics Software Curator
Dept. of BCMP, Harvard Medical School
— BioGrids.org --
On Jan 13, 2023, 4:59 AM -0500, dlukauskis @.***>, wrote:

This is typically what I see when the code fails to find anchor atoms. Add this line after line 439 in openbpmd.py:
print(lig_ha_idx, anchor_atom_idx)
What does it print?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

The issue has been fixed, the ligand resname in the input files was 'UNK', instead of the default 'MOL'. Latest pull request fixed that.


New article

👷 Deploy Preview for crpp-ai-oncology processing.

Name
Link

🔨 Latest commit
420d3b05eb169d7e4ec641df0db66c41fa05bda7

🔍 Latest deploy log
https://app.netlify.com/sites/crpp-ai-oncology/deploys/6367a782130fd40009e31ac3


Spellchecker replacement broken

When using codemirror-vim with a browser spellchecker, choosing the correct replacement doesn't work.
I have bisected the issue to this commit https://github.com/replit/codemirror-vim/commit/5d29c9fca2082186fce77786b968a02cee218ab0
I believe the spellchecker correction action gets considered as an unknown key event and causes the change to get reverted.
To reproduce:

Go to https://replit.com/@util/codemirror-vim
Use developer console to swap spellcheck="false" to spellcheck="true"
Attempt to replace a misspelled word

Video:
https://github.com/replit/codemirror-vim/assets/609710/3f6633ea-5bb7-4b84-b572-b430a71d9988

I can confirm that this issue is affecting obsidian downstream.

Here to add support for this bug. This issue is also affecting me.

Does not seem fixed, please reopen.

Do you mean that the issue is reproducible on master branch (e.g. on https://raw.githack.com/replit/codemirror-vim/master/dev/web-demo.html), or that the fix is not released to npm yet?

Sorry about that, I was testing on the replit site! Master seems to work.


How can start/up container from other container

i'm looking how start container from other container.
My need is that a container is checking some kpi in real time, and if need, start new instances of a container and do some commands.
I'm doing it in php
I can do it from host installing nginx-php, but i want do it from a container to had more clean the host and architecture.
Thanks
P.D: It's not an issue, but in google not found any related to this

You can mount the Docker socket to achieve that (-v /var/run/docker.sock:/var/run/docker.sock).
(Note that it can be dangerous)


TextField widget throws "Linked LeaderLayer anchor is not in the same layer tree as the FollowerLayer." when nested in a View inside a View

Steps to reproduce

Create an application that builds adds a View at the toplevel and a ViewAnchor around a button. When the button is clicked, the ViewAnchor should open up a View that contains a TextField.
Click on the TextField in the sub-view that is opened
Note that you will encounter the following error:

The following assertion was thrown during a scheduler callback:
Linked LeaderLayer anchor is not in the same layer tree as the FollowerLayer.
'package:flutter/src/rendering/layer.dart':
Failed assertion: line 2651 pos 7: 'leader.owner == owner'

Either the assertion indicates an error in the framework itself, or we should provide substantially
more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=2_bug.yml

When the exception was thrown, this was the stack:
#2      FollowerLayer._establishTransform (package:flutter/src/rendering/layer.dart:2651:7)
#3      FollowerLayer.addToScene (package:flutter/src/rendering/layer.dart:2716:5)
#4      Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:722:5)
#5      ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1356:13)
#6      TransformLayer.addToScene (package:flutter/src/rendering/layer.dart:1973:5)
#7      ContainerLayer.buildScene (package:flutter/src/rendering/layer.dart:1108:5)
#8      RenderView.compositeFrame (package:flutter/src/rendering/view.dart:349:37)
#9      RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:614:20)
#10     WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:1178:13)
#11     RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:475:5)
#12     SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1397:15)
#13     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1318:9)
#14     SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1176:5)
#15     _invoke (dart:ui/hooks.dart:312:13)
#16     PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:419:5)
#17     _drawFrame (dart:ui/hooks.dart:283:31)
(elided 2 frames from class _AssertionError)

Expected results
TextFields that are nested within a nested View can be focused
Actual results
The field is never focused. Technically you can interact with it by typing, but the update comes at weird intervals
Code sample
Note: Some of the widgets and methods defined here are wrappers around creating a window on the platform in C++ (e.g. createRegularWindow will reach out over a channel and create a Window that wraps the idea of a FlutterView). For that reason, the code is probably not copy-pasteable for you. But this should provide the gist of what's going on here. Let me know if you need any clarification on anything.
Code sample
import 'package:flutter/material.dart';

void main() {
  runWidget(MultiWindowApp(initialWindows: [
    (context) => createRegularWindow(
        context: context,
        size: const Size(640, 480),
        builder: (context) {
          return const MyApp();
        })
  ]));
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  Window? _window;

  void _openDialog(BuildContext context) async {
    final WindowContext? windowContext = WindowContext.of(context);
    if (windowContext == null) {
      return;
    }

    final Window newWindow = await createDialogWindow(
        context: context,
        size: const Size(400, 300),
        parent: WindowContext.of(context)!.window,
        builder: (BuildContext context) {
          return MaterialApp(
            home: Scaffold(
              body: Center(
                  child: Column(
                children: [child: TextField()],
              )),
            ),
          );
        });

    setState(() {
      _window = newWindow;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          backgroundColor: Theme.of(context).colorScheme.inversePrimary,
          title: Text(widget.title),
        ),
        body: const Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              const Text(
                'Click the button to open a dialog',
              )
            ],
          ),
        ),
        floatingActionButton: ViewAnchor(
            view: _window == null
                ? null
                : View(view: _window!.view, child: _window!.builder(context)),
            child: FloatingActionButton(
              onPressed: () => _openDialog(context),
              tooltip: 'Open Dialog',
              child: const Icon(Icons.add),
            )));
  }
}

Screenshots or Video
No response
Logs
Logs
══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════
The following assertion was thrown during a scheduler callback:
Linked LeaderLayer anchor is not in the same layer tree as the FollowerLayer.
'package:flutter/src/rendering/layer.dart':
Failed assertion: line 2651 pos 7: 'leader.owner == owner'

Either the assertion indicates an error in the framework itself, or we should provide substantially
more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=2_bug.yml

When the exception was thrown, this was the stack:
#2      FollowerLayer._establishTransform (package:flutter/src/rendering/layer.dart:2651:7)
#3      FollowerLayer.addToScene (package:flutter/src/rendering/layer.dart:2716:5)
#4      Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:722:5)
#5      ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1356:13)
#6      TransformLayer.addToScene (package:flutter/src/rendering/layer.dart:1973:5)
#7      ContainerLayer.buildScene (package:flutter/src/rendering/layer.dart:1108:5)
#8      RenderView.compositeFrame (package:flutter/src/rendering/view.dart:349:37)
#9      RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:614:20)
#10     WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:1178:13)
#11     RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:475:5)
#12     SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1397:15)
#13     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1318:9)
#14     SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1176:5)
#15     _invoke (dart:ui/hooks.dart:312:13)
#16     PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:419:5)
#17     _drawFrame (dart:ui/hooks.dart:283:31)
(elided 2 frames from class _AssertionError)
════════════════════════════════════════════════════════════════════════════════════════════════════

Another exception was thrown: Linked LeaderLayer anchor is not in the same layer tree as the FollowerLayer.
Another exception was thrown: Linked LeaderLayer anchor is not in the same layer tree as the FollowerLayer.
Another exception was thrown: Linked LeaderLayer anchor is not in the same layer tree as the FollowerLayer.

Flutter Doctor output
Doctor output
[!] Flutter (Channel [user-branch], 3.24.0-1.0.pre.335, on Microsoft Windows [Version 10.0.22631.4037], locale en-US)
    ! Flutter version 3.24.0-1.0.pre.335 on channel [user-branch] at C:\Users\mkosa\Git\flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/setup.
    ! Upstream repository unknown source is not the same as FLUTTER_GIT_URL
    • FLUTTER_GIT_URL = https://github.com/flutter/flutter
    • Framework revision 31fa3b83d0 (31 hours ago), 2024-08-28 08:39:28 -0300
    • Engine revision 356d51d467
    • Dart version 3.6.0 (build 3.6.0-149.3.beta)
    • DevTools version 2.38.0
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Windows Version (Installed version of Windows is version 10 or higher)

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/to/windows-android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[✗] Chrome - develop for the web (Cannot find Chrome executable at .\Google\Chrome\Application\chrome.exe)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.11.1)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.11.35219.272
    • Windows 10 SDK version 10.0.26100.0

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/to/windows-android-setup for detailed instructions).

[✓] VS Code (version 1.92.2)
    • VS Code at C:\Users\mkosa\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.94.0

[✓] Connected device (2 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22631.4037]
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 128.0.2739.42

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 4 categories.

Nevermind, this fixes it: https://github.com/flutter/flutter/pull/154300


chore: updated dependencies removed unused dependencies.

Description

Add resolution for json5 dependency to resolve package vulnerabilities.
Remove babel-plugin-styled-components because it was unused.
Related to react-scripts , if everything builds and dev server is running as expected we have no issues.

Fixes #19448
Media

A video or a GIF is preferred. when using Loom, don’t embed because it looks like it’s a GIF. instead, just link to the video

Type of change

Please delete options that are not relevant.

Non-breaking change.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions, so we can reproduce.
Please also list any relevant details for your test configuration.
Delete anything that is not important

Manual
Jest
Cypress

Test Plan

All tests need to pass.
Does not need a regression.

Issues raised during DP testing

Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR)

Checklist:
Dev activity

[ ] My code follows the style guidelines of this project
[ ] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] PR is being merged under a feature flag

QA activity:

[ ] Test plan has been approved by relevant developers
[ ] Test plan has been peer reviewed by QA
[ ] Cypress test cases have been added and approved by either SDET or manual QA
[ ] Organized project review call with relevant stakeholders after Round 1/2 of QA
[ ] Added Test Plan Approved label after reveiwing all Cypress test

@yaldram Thank you for cleaning up the codebase. I really appreciate this.
There are a few things I'd like to ask you to add to the PR description.

What was the issue?
What changes have we made to resolve the issue?
The task issue id which calls for this resolution.
How do we know if this change breaks anything? (Which tests would tell us this)

@riodeuno I have updated the pull request description. This Pull request resolves a vulnerability, it needs no Q/A as it is related to the react-scrips dependencies, we aren't shipping this code to our customers.

@yaldram I don't see a few details in the PR:

An issue id.
The PR seems to say Breaking change. If this is correct, we need to elaborate on what could break.
If we only expect existing tests to pass, we need to mention that in the tests section.
If we need a full regression for this, we will need to mention that as well.

@riodeuno done.

/ok-to-test sha=8aa1e6c

/ok-to-test sha=0321735

/ok-to-test sha=0321735

/ok-to-test sha=ed45952


Improve Core Dumps

According to https://man7.org/linux/man-pages/man5/proc.5.html:
2 ("suidsafe")
                     Any binary which normally would not be dumped (see
                     "0" above) is dumped readable by root only.  This
                     allows the user to remove the core dump file but
                     not to read it.  For security reasons core dumps in
                     this mode will not overwrite one another or other
                     files.  This mode is appropriate when
                     administrators are attempting to debug problems in
                     a normal environment.

                     Additionally, since Linux 3.6,
                     /proc/sys/kernel/core_pattern must either be an
                     absolute pathname or a pipe command, as detailed in
                     [core(5)](https://man7.org/linux/man-pages/man5/core.5.html).  Warnings will be written to the kernel
                     log if core_pattern does not follow these rules,
                     and no core dump will be produced.

Currently our core path is core, which is of course not an absolute path.
Maybe we should make it an absolute path (NOT in /home/hacker, probably just /core or /cores/<pid>).
This would make coredumps more natural.
They are generated regardless of the fact that the challenge is setuid.
Then it's just a (more natural) permission issue for being able to access it.

This is an amazing idea. We lose a bit of naturalness by not having it in ./core, but that's practically a custom setting nowdays anyways, so nothing wrong with /cores or even /tmp

What's the status of this issue? We set up a challenge in our security software course, in which we want students to provide an input with cyclic, fetch values overwriting return address and figure out the offset of return address in the input with cyclic_find. However, students find out the challenge file with setuid cannot generate core dump at crash. The temporary solution is to copy the challenge file into home directory and change the path of 1st program running. The 2nd program running still uses the original program path.


Color Codes for Background Markers

Is there documentation for the hex or rgb color codes for the markers?  For example, It would be great to know what color "darkred" is.

See it #42


docs: clearly differentiate implementation code and stub code

Closes #1034
Summary of Changes
In the library docs, replace the words "source code" with either "stub code" or "implementation code" depending on whether a declaration has an implementation in Safe-DS (pipeline/segment).

:tada: This PR is included in version 0.12.0 :tada:
The release is available on:

npm package (@latest dist-tag)
npm package (@latest dist-tag)
v0.12.0
GitHub release

Your semantic-release bot :package::rocket:


Make linter fix errors on its own?

In home assistant, the pre-commit hook fixes linter problems automatically. You just have to review, git add and git commit again. Can we enable that here, too? That would not make us have to manually fix every space and comma...

@rchl

We sure can.
But personally I'm just running with eslint enabled that fixes all issues automatically on saving the file. You should try that.

So, you install eslint via npm and run it as some kind of background process? Or as a plugin to your editor?

It's an editor plugin. I'm Using Sublime Text so LSP + LSP-eslint packages work great for that.
For VSCode there is an Eslint extension that will do that.

OK. I see. I'll try some options. Probably I'll just resolve to running eslint --fix scripts/ manually before committing... :-)

Or npn run fix

I resolved to running yarn fix. Just need to get it into my habits. :-) I don't have the nerves to change to a different editor. ;-)
I'll close the issue to reduce the number of issues a bit...


Is it possible to remove the connector on the Raspberry Pi end? Like removing it from command line?

Thanks

Did you edit your /etc/rc.local file to install this? If so, try editing that file and removing the line that starts the connector.
Otherwise, you can try systemctl disable gcp if you followed the instructions at https://github.com/google/cups-connector/wiki/Run-Connector-Automatically-on-Boot.
Please reopen if you need more help.


quartata: Watch officesetup-com.com

quartata requests the watch of the watch_keyword officesetup-com.com. See the Metasmoke search here

!!/approve


Fixes for 410

Major changes - new version required !!
Adoptions for types and providers to work on OpenNebula 4.10
Adoptions for sunstone to work on systems without internet access.

before we merge, we should add a tag, or am i wrong?

Either way should work.
Setting new tag first might be more transparent.

okay, I will make a tag and than merge your PR.

Sooooo... tag v1.0.2 is released
will merge now... :boom:


memory leak bug

Hi, @manjuraj
We are used many mset commands at a twemproxy, and the twemproxy's memory keep increasing all the time.
I reviewed the twemproxy code carefully and find there are some mbufs were not be recovered in the redis_copy_bulk() function at some point.
And i make a pull request #486  for this bug, please help me check it. Thank you!

fixed in PR #486


Ledger live integration in non-experimental mode

I see that there is a guide to set up a Ledger Nano S/X  with Avalanche. However in the guide it states:
The Avalanche Ledger wallet app is currently available via Ledger Live in Experimental Mode.
Why is this? Is enabling Avalanche to work with ledger in the standard mode (non-expiremntal mode) a feature request I should be requesting from Ledger or here?
Thank you!

Ah I see the app is maintained by Ava-Labs here https://github.com/ava-labs/ledger-app-avalanche . Is there a roadmap or any information you can share around when one might expect this feature request to be available?

Before an app is listed on Ledger Live, it is listed in "experimental" mode.
We are working with the Ledger team to have the Avalanche app listed as a regular application (i.e. not in experimental mode.)
Unfortunately we don't have an exact timeline for when this will happen.

Thanks so much for the quick response. Will subscribe for updates.


Increase performance of language models

A minimal set of changes to resolve the performance issue I observed as explained on issue #2495.
It is expected to lead to a 100-1000x speed increase.
Highlighting relevant developers: @stevenbird @iliakur

@palasso I'm trying to wrap up my thesis by the end of this month, so I'll take a look at this sometime in the first two weeks of april. I hope to use this excuse to experiment with adding some timing benchmarks to the automatic tests. If you're feeling ambitious, feel free to do so as well!
My initial impression is that it's a decent optimization, primarily because it is simple :)

Oh, I just noticed that you are indeed running tests. When you have them in good shape, would be wonderful to get them added to NLTK!

[CI:retest]

@palasso I've submitted my thesis, but adjusting to work life (and COVID-19-related issues) is taking longer than anticipated.
I'd expect to get to this within the next 2-3 weeks.
Thanks for your patience!

Thank you @iliakur . I don't know the release schedule of NLTK but I hope it makes in time for the next release of 3.5.

Hi gang, I finally got a moment to look at this properly.
@palasso thanks again for sending it in and being so patient :)
I have a few questions/concerns:
This seems to enable caching by default all the time. Disabling the cache seems a bit hairy, definitely not something to expect from a regular user. As we all know, caches are nice, but occasionally can lead to annoying behaviour (invalidating them is a pain, for instance). I wonder if we should consider providing an easy way to disable the cache.
Looking at the concrete way you implemented the cache, I noticed you had to touch literally all the main files in the module: api, smoothing, models. I suspect this won't be as easy to maintain as keeping all cache-related logic in one place.
With this in mind, what do you think of this idea (simplified and abridged to include only relevant parts)?
# api.py

class LanguageModel:
    def __init__(self, order, vocabulary=None, counter=None, cache=True):
        # we enable caching by default, but it's easy to turn off
        self.order = order
        self.vocab = Vocabulary() if vocabulary is None else vocabulary
        self.counts = NgramCounter() if counter is None else counter
        if cache:
            self.score = cached(self.score)

Where cached is some standard implementation of a cache that just remembers its arguments. Here's a rough draft:
from functools imports wraps

def cached(score_func):
     cache = {}

    @wraps(score_func)
    def wrapper(word, context=None):
        k = (word, context)
        if k in cache:
            score = cache[k]
        else:
            score = cache[k] = score_func(word, context)
        return score
    return wrapper

Another, perhaps even simpler idea would be to include the caching logic inside of the LanguageModel.score method itself. In any case we are keeping the caching localized to only one place.
I noticed these proposals don't cache the len(vocab) call, but I'm honestly not expecting a big of a slowdown from that. Would be open to empirically verifying this though.

BTW, this is a good use case for https://docs.python.org/3/library/functools.html#functools.lru_cache =)
And example is how it's applied in Levenshtein distance. https://gist.github.com/alvations/989dacca76c820c48ef18c4637515b39#file-sent_ter-py-L4

Is LRU a good caching scheme for language models?
This does bring up another idea though: what if the cache argument to __init__ were to accept not only a simple boolean, but either None or a caching function? This would let the user roll their own caching mechanism if they want to or use something that exists like lru_cache. In any case, the user has options and the freedom to tweak things to their particular needs. Kudos @alvations :)

I noticed these proposals don't cache the len(vocab) call, but I'm honestly not expecting a big slowdown from that. Would be open to empirically verifying this though.

From the testing I have performed the len(vocab) call costs the most in terms of speed while its result usually doesn't change.

Oh, I'm surprised by that. I would personally focus our optimization efforts on it then. This week I'll sit down and try timing and tweaking it a bit. If you have numbers examples that target explicitly that call (I checked the linked notebook but couldn't find any there), more information is welcome :)

Note that unless the instance value changes, the len(x) function might not actually be recounting all the time in Python https://stackoverflow.com/questions/29057153/does-the-len-built-in-function-iterates-through-the-collection-to-calculate-it

Hmm, I suspect this doesn't really apply to classes that implement their own __len__ which involves a comprehension the way Vocabulary currently does. This is probably what needs to be tweaked.

@palasso I can confirm that the running time of len(vocab) increases linearly with the size of the vocabulary.
I got it to be linear with the following tweaks:
class Vocabulary:

    def __init__(
                        self,
                        counts=None,
                        unk_cutoff=1,
                        unk_label="<UNK>"
        ):
        self.unk_label = unk_label
        if unk_cutoff < 1:
            raise ValueError(
                "Cutoff value cannot be less than 1. Got: {0}".format(unk_cutoff)
            )
        self._cutoff = unk_cutoff

        self.counts = Counter()
        self.update(counts)

    def update(self, *counter_args, **counter_kwargs):
        self.counts.update(*counter_args, **counter_kwargs)
        self._len = sum(1 for _ in self)

    def __len__(self):
        """Computing size of vocabulary reflects the cutoff."""
        return self._len

Would you be interested in submitting this either in this PR or as a new one? It would still need to be tested, and it would be cool if we could try plugging it into your benchmark suite.
Let me know if you don't think you'll have the resources for it, I have some time on my hands and this kind of tinkering is fun :)

I run the benchmark again with the modification of Vocabulary and without.
Original Vocabulary
trigrams:
{'LID': 25.451935806000165,
 'LIDM': 0.025555172999702336,
 'KNI': 27.028115159000208,
 'KNIM': 0.24075353199987148,
 'WBI': 86.52406588799977,
 'WBIM': 0.2683036789999278}

fivegrams:
{'LID': 30.00634654300029,
 'LIDM': 0.03528844099992057,
 'KNI': 29.600673633000042,
 'KNIM': 0.3856433239998296,
 'WBI':<PHONE_NUMBER>029999,
 'WBIM': 0.46601980600007664}

New Vocabulary
trigrams:
{'LID': 0.08882101800008968,
 'LIDM': 0.043921537000642275,
 'KNI': 0.26541022899982636,
 'KNIM': 0.25694879999991826,
 'WBI': 89.90805916800036,
 'WBIM': 0.2864626069995211}

fivegrams:
{'LID': 0.04899713899976632,
 'LIDM': 0.044580556000255456,
 'KNI': 0.32740841299983003,
 'KNIM': 0.3006070129995351,
 'WBI':<PHONE_NUMBER>860003,
 'WBIM': 0.39238316000046325}

As can be observed, caching the vocabulary length within the Vocabulary class, results in having inference time of the same order with or without my modifications for:

Lidstone Smoothing
Kneser-Ney Smoothing with Interpolation

That is not the case with Witten-Bell Smoothing with Interpolation. This is because of the counts[n].N() operation which costs a lot and can also be cached. Do you think this should also be cached in NgramCounter? In that case we could remove the Cache I made and just keep cache in Vocabulary and NgramCounter.

Ah, this becomes tricky. counts[n].N() calls the N method of the FreqDist and ConditionalFreqDist classes. FreqDist caches that, but ConditionalFreqDist doesn't. I suggest we tackle this in a separate pull request because I don't feel confident messing with that code until we've added some tests for it.
If you really cannot tolerate a slow WBI for your system and require that functionality ASAP, feel free to keep the caching mechanism in your fork. When it comes to this PR, I'd consider speeding up the Vocabulary a very worthy contribution for the time being.
I think we should focus on solidifying the progress we've made. This mostly has to do with tests. I think the best way to both demonstrate and confirm the len speedup is by showing that it runs in constant time no matter the size of the vocabulary. To this end we can create an "obviously small" (<10 items?) instance and an "obviously large" (a whole corpus?) one and show that calculating the len of both takes the same amount of time. This has the advantage of being very portable: no matter how powerful or weak your processor, constant time operations should take, well, constant time :)

@palasso anything else I can do to help move this forward?

@iliakur Thank you for your help, your suggestions and the code changes. Next weekend I'll have more time and I will rework the PR and the benchmarks as well to test all the combinations. I am also thinking to include training time just to make sure there were no regressions there.

I updated the branch with the benchmarks in order to test the performance of the various implementations and on whether there were any regressions.
I did not test Witten-Bell Smoothing with Interpolation because we already know that the fix in Vocabulary does not improve it and it would take much more time to benchmark.
LID: Lidstone-smoothing
KNI: Kneser-Ney Smoothing with Interpolation
M: Modified language model implementation
V: Modified Vocabulary implementation

trigram

training time
LID:<PHONE_NUMBER>7700116
LIDM:<PHONE_NUMBER>1199778
LIDMV:<PHONE_NUMBER>1099928
LIDV:<PHONE_NUMBER>4600186
KNI:<PHONE_NUMBER>8299808
KNIM:<PHONE_NUMBER>5499873
KNIMV:<PHONE_NUMBER>379992
KNIV:<PHONE_NUMBER>0100295

inference time
LID:<PHONE_NUMBER>7300033
LIDM: 0.27742780200060224
LIDMV: 0.27167368099981104
LIDV: 0.2825343350014009
KNI:<PHONE_NUMBER>6600044
KNIM: 2.921886004998669
KNIMV: 3.961752424998849
KNIV: 4.490208731000166

fivegram

training time
LID:<PHONE_NUMBER>680017
LIDM:<PHONE_NUMBER>490007
LIDMV:<PHONE_NUMBER>1699813
LIDV:<PHONE_NUMBER>5400187
KNI:<PHONE_NUMBER>120007
KNIM:<PHONE_NUMBER>1599687
KNIMV:<PHONE_NUMBER>4399665
KNIV:<PHONE_NUMBER>3500087

inference time
LID:<PHONE_NUMBER>4699786
LIDM: 0.6001836180003011
LIDMV: 0.5922620089986594
LIDV: 0.6049938080032007
KNI:<PHONE_NUMBER>770008
KNIM: 6.205774944999575
KNIMV: 4.547874755997327
KNIV: 4.407776099997136

We can observe that the change on Vocabulary is enough to significantly improve inference time for both Lidstone Smoothing and Kneser-Ney Smoothing with Interpolation without any regression in training time.
Additionally, I run the same nltk.ipynb file again by replacing the two occurrences of english.sents() with english.sents()[:1000] (out of 19899 sentences), to test on whether the inference time is constant compared to vocabulary size.
LID: 53.094840910998755
LIDM: 0.29920799500177964
LIDMV: 0.2889021379996848
LIDV: 0.30506811599843786
KNI: 53.458264933000464
KNIM: 1.0204762119974475
KNIMV: 1.0211700770014431
KNIV: 1.0307058569997025

LID: 53.63951414499752
LIDM: 0.3840107810028712
LIDMV: 0.3840423500005272
LIDV: 0.38946822899742983
KNI: 56.61550912999883
KNIM: 1.5345575059982366
KNIMV: 1.6229681520017039
KNIV: 1.5848969139988185

Inference time for Lidstone smoothing seems to be close to constant compared to the size of the vocabulary. For Kneser-Ney Smoothing with Interpolation it seems that it was 3 times faster with vocabulary size of 1k (as opposed to 20k).

Since we're going towards the direction of changing only Vocabulary I closed this PR and made a new PR #2555


TS-4706 Truncated SNI name during escalation

SSL hostname verification failing due to truncated SNI name.
(cherry picked from commit 4d02d0e877e24b1dc94948c236462417bdd9bbf0)

FreeBSD build successful! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/1147/ for details.

Linux build successful! See https://ci.trafficserver.apache.org/job/Github-Linux/1040/ for details.


Feat/vulkan

Add support for vulkan backend in latest whisper.cpp.
Depends on https://github.com/tazz4843/whisper-rs/pull/169
Improve version of https://github.com/tazz4843/whisper-rs/pull/168

~Also changed whisper.cpp commit to a bit older commit since latest whisper.cpp is broken with vulkan.~

Tested on Windows 11. It works fast.

Going to make one final release with OpenCL and then another major release with Vulkan, as I found a 80% performance loss in my testing when I tried Vulkan.

as I found a 80% performance loss in my testing when I tried Vulkan

What specific performance do you mean? the speed or the quality? (Because there's some issues I heard about the quality)
If it's about speed, which OS and what GPU you have?

Speed, Linux with an Arc A770

Speed, Arch Linux with an Arc A770

If it's that drastic like 80% slower maybe the logs suggest that whisper fallback to CPU?

The logs do show whisper running on Vulkan. It's not a major hit to my use case to stay on an old version of whisper forever so I'm likely just going to do that.
ggml_vulkan: Found 1 Vulkan devices:
Vulkan0: Intel(R) Arc(tm) A770 Graphics (DG2) (Intel open-source Mesa driver) | uma: 0 | fp16: 1 | warp size: 32
whisper_model_load: Intel(R) Arc(tm) A770 Graphics (DG2) total size =  1176.00 MB
whisper_model_load: model size    = 1176.00 MB
whisper_backend_init_gpu: using Vulkan backend


Parameter not Interpreted in Init

Hello,
This is the output from the Init
Starting: terraform init
==============================================================================
Task         : Terraform CLI
Description  : Execute terraform cli commands
Version      : 0.6.21
Author       : Charles Zipp
Help         :
==============================================================================
/usr/local/bin/terraform version
Terraform v0.15.0
on linux_amd64

Your version of Terraform is out of date! The latest version
is 0.15.1. You can update by downloading from https://www.terraform.io/downloads.html

/usr/local/bin/terraform init
-backend-config=storage_account_name=steu1prdtfbackend001
-backend-config=container_name=blbeu1prdtfbackend
-backend-config=key=dataanalyticsservices/it/poc/int/01/<<blank>>/terraform.tfstate
-backend-config=resource_group_name=rg-prd-tfb-001
-backend-config=subscription_id=xxx -backend-config=tenant_id=*** -backend-config=client_id=*** -backend-config=client_secret=***
Terraform initialized in an empty directory!

The directory has no Terraform configuration files. You may begin working
with Terraform immediately by creating Terraform configuration files.

Finishing: terraform init

As you can see in the config key there is a // (presented as /<>/ to pull attention), the code in task-group is
$(conf_directory)/$(pl_exec_service)/config
After the init to do a bash command showing the parameters
Starting: Show Parameters
...
echo "pl_destroy = false"
echo  "main_directory = /home/vsts/work/1/s/DAS_InfraAsCode/it-poc-int-01"
echo  "conf_directory = /home/vsts/work/1/s/DAS_InfraAsCode/it-poc-int-01/rg/config"
echo  "tfstate_subscription = Azure - Sibelco - FS-PRD-MGT-01"
echo  "tfstate_resourcegroup = rg-prd-tfb-001"
echo  "tfstate_storageaccount = steu1prdtfbackend001"
echo  "tfstate_container = blbeu1prdtfbackend"
echo  "tfstate_directory = dataanalyticsservices/it/poc/int/01/rg"
echo  "System.DefaultWorkingDirectory = /home/vsts/work/1/s"

So I'm a bit confused why the Bash-Cmd interprets the parameters with the supplied values and the CLI-Init not.
Suppose I'm doing something wrong but ....
The value for my pl_exec_service is set in the Task Group, on the pipeline itself it is blank.

Found a solution, problem was due to DevOps syntax, not Terraform CLI.


Crashing when loading nib of QMChatViewController from subclassed viewcontroller

Help avoid duplicate issue reports, check existing issues
Environment details
iOS version, Quickblox iOS SDK version, QMChatViewController version
I'm using this with swift 2.3 xcode 8 - I'm using the latest version of Quickblox and QMChatViewController
Did this work before?
No
Expected behavior
Can't load QMChatViewController
Actual behavior
I get a crash everytime when I try to load the nib.
'NSInvalidArgumentException', reason: 'NSLayoutConstraint for <QMInputToolbar: 0x7f970a6cb750; baseClass = UIToolbar; frame = (0 524; 320 44); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x600000023120>>: A multiplier of 0 or a nil second item together with a location for the first attribute creates an illegal constraint of a location equal to a constant. Location attributes must be specified in pairs.'
Logs
Attach full logs that will describe your problem (please, use github gist)
https://gist.github.com/anonymous/5232001f339ff0d2cb5edddd303d993e
Steps to reproduce the behavior
running on swift
Any others comments?
no

Hi,
We are currently working on updated chat controller in development branch and are going to release it soon. Can you try chat controller from development branch and hit us up if anything is working good?

Sure.
On Tue, Nov 8, 2016 at 3:22 AM, Vitaliy Gorbachov<EMAIL_ADDRESS>wrote:

Hi,
We are currently working on updated chat controller in development branch
and are going to release it soon. Can you try chat controller from
development branch and hit us up if anything is working good?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/QuickBlox/QMChatViewController-ios/issues/97#issuecomment-259112033,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABVBEf84y6fJ9QXdhGsYLeb984hxD5mHks5q8Ft2gaJpZM4KqdyH
.

I tried version 0.4 but I am still getting the same crash. Please advise.
On Tue, Nov 8, 2016 at 10:06 AM, Joren Winge<EMAIL_ADDRESS>wrote:

Sure.
On Tue, Nov 8, 2016 at 3:22 AM, Vitaliy Gorbachov <
<EMAIL_ADDRESS>wrote:

Hi,
We are currently working on updated chat controller in development branch
and are going to release it soon. Can you try chat controller from
development branch and hit us up if anything is working good?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/QuickBlox/QMChatViewController-ios/issues/97#issuecomment-259112033,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABVBEf84y6fJ9QXdhGsYLeb984hxD5mHks5q8Ft2gaJpZM4KqdyH
.

I know what the problem is. I can't install via cocoa pods - I'm not
allowed by my project manager to use cocoa pods and it seems compiling it
without cocoa pods causes an error. Any thoughts on how to get around this?
On Thu, Nov 10, 2016 at 12:24 AM, Joren Winge<EMAIL_ADDRESS>wrote:

I tried version 0.4 but I am still getting the same crash. Please advise.
On Tue, Nov 8, 2016 at 10:06 AM, Joren Winge<EMAIL_ADDRESS>wrote:

Sure.
On Tue, Nov 8, 2016 at 3:22 AM, Vitaliy Gorbachov <
<EMAIL_ADDRESS>wrote:

Hi,
We are currently working on updated chat controller in development
branch and are going to release it soon. Can you try chat controller from
development branch and hit us up if anything is working good?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/QuickBlox/QMChatViewController-ios/issues/97#issuecomment-259112033,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABVBEf84y6fJ9QXdhGsYLeb984hxD5mHks5q8Ft2gaJpZM4KqdyH
.

Can you setup a test project (clean one) with issue being reproducible and attach it here?

QBTestProject.zip
Sure.

Is there a test project with version 0.4 of chat controller?

QBTestProject_updated.zip
Here you go. Same crash occurs.

I'm currently working on this issue and will post update soon.

Great! Thanks so much.
On Monday, November 14, 2016, Vitaliy Gorbachov<EMAIL_ADDRESS>wrote:

I'm currently working on this issue and will post update soon.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/QuickBlox/QMChatViewController-ios/issues/97#issuecomment-260277932,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABVBERB_5OkiA75vKAWxY5feLdVjgMVnks5q-B7ZgaJpZM4KqdyH
.

Please update to <IP_ADDRESS>, should be fixed now.

fixed.


Getting {"acknowledged":true}, but files don't show up in S3.

We wanted to try using the aws-cloud for backups for our elasticsearch data. I'm using the plugin for ES1.7. I only get {"acknowledged":true} when I run this:
curl -XPUT 'http://localhost:9200/_snapshot/ph_es_snapshot?wait_for_completion=true' -d '{
    "type": "s3",
    "settings": {
        "bucket": "projectname_bucket",
        "region": "us-east-1",
        "base_path": "/es_snapshots/projectname",
        "access_key": <our_s3_access_key>,
        "secret_key": <our_s3_secret_key>
    }
}'

ES and the plugin are running inside a Docker container.
When I run: curl localhost:9200/_snapshot/projectname/
I get back the data included in my PUT above.
When I run: curl localhost:9200/_snapshot/project_name/_all
I get: {"snapshots":[]}

Did you mean: curl localhost:9200/_snapshot/ph_es_snapshot/ and curl localhost:9200/_snapshot/ph_es_snapshot/_all?
Any chance you could test it without docker? Can you also check elasticsearch logs?

I have a similar issue. I get the acknowledged message but no files, no errors. I am using the IAM role of the instance and am able to copy files to the bucket/prefix.
PUT /_snapshot/backup
{
"type": "s3",
"settings": {
"bucket": "xxxx-xxxx-xxxx-appdata",
"region": "us-east-1",
"base_path": "ELASTIC",
"server_side_encryption": "true"
}
}
GET _snapshot/backup/_all
{
"snapshots": []
}
elasticsearch log:
[2016-03-26 07:28:24,679][INFO ][repositories             ] [ip-xxxxx-development_svc] put repository [backup]
[2016-03-26 07:33:14,706][INFO ][repositories             ] [ip-xxxxxxxx-development_svc] update repository [backup]

have you created the bucket before create the repo?

Yes, another team creates the buckets.

On Mar 26, 2016, at 2:33 PM, Xu Zhang<EMAIL_ADDRESS>wrote:
have you created the bucket before create the repo?
—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub https://github.com/elastic/elasticsearch-cloud-aws/issues/257#issuecomment-201909721

I have added this to the yaml but still no files in s3 or errors.
cloud:
aws:
s3:
protocol: https
proxy:
port: 3128
host: awsproxy

@mfcarbo @darylyu Did you manage solving your issue?

Nope. Ended up using a different tool.

@darylyu Did you backup "manually" your shards on S3? Like with rsync or such? I'm curious about what you used.

@dadoonet I have not been able to solve. In the short term I may need to set up an nfs mount and do the filesystem backup. But this is not ideal in AWS. I am playing around with v5 alpha next sprint and will see if the backup works with it.

Looks like you need a snapshot name! e.g. PUT /_snapshot/s3_repository/snapshot1
After that, the upload sprung to life...
Using node.js on Lambda:
'use strict';

const http = require('http');

/**
 * Pass the data to send as `event.data`, and the request options as
 * `event.options`. For more information see the HTTPS module documentation
 * at https://nodejs.org/api/https.html.
 *
 * Will succeed with the response body.
 */
exports.handler = (event, context, callback) => {
    const req = http.request(event.options, (res) => {
        let body = '';
        console.log('Status:', res.statusCode);
        console.log('Headers:', JSON.stringify(res.headers));
        res.setEncoding('utf8');
        res.on('data', (chunk) => body += chunk);
        res.on('end', () => {
            console.log('Successfully processed HTTP response');
            // If we know it's JSON, parse it
            if (res.headers['content-type'] === 'application/json') {
                body = JSON.parse(body);
            }
            callback(null, body);
        });
    });
    req.on('error', callback);
    req.write(JSON.stringify(event.data));
    req.end();
};

... with this JSON:
{
  "options": {
    "host": "elastic-load-balancer.ap-southeast-2.elb.amazonaws.com",
    "port": 9200,
    "path": "/_snapshot/s3_repository/snapshot1",
    "method": "PUT"
  },
  "data": {
    "type": "s3",
    "settings": {
      "bucket": "production-es-snapshots",
      "region": "ap-southeast-2",
      "protocol": "https",
      "chunk_size": "100m"
    }
  }
}

This document on logging was also useful:
https://www.elastic.co/blog/elasticsearch-logging-secrets
Cheers,
Nigel (@wtfiwtz)