sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: next.js
Issue: Poor performance (request/second) for large page
Labels: bug

### Link to the code that reproduces this issue

https://github.com/bard4/nextjs-performance

### To Reproduce

My goal is to move specifc service from older technology (Java + tomcat + jsp) to next.js.

Requirements:

-     Page must be generated as SSR (every user sees different data)
-     Page is large (over 800kB, over 2000 DOM elements)
-     I cannot use lazy loading - all content must be served at once (required by SEO dep.)


Page generation looks like this:

1.   I call one backend endpoint (just for tests it returns static data - response time < 30ms)
2.   Based on this data I generate ~2000 divs (each one has image and title)

THATS ALL WHAT I HAVE IN MY CODE.

I use fasthttploader to benchmark my app.

When I run it with 10 clients and 10 requests per second the result I get is very weak (~1,5 - 2 sec).
![nextjs-10-req_s](https://github.com/vercel/next.js/assets/36726756/781bdf76-4449-40b2-a385-ee9afb880d37)

The same page servered on tomcat - for 30 req/sec (3 TIMES MORE !) the result I get is very good (~ 0,10 - 0,20 sec).
![tomcat-30-req_s](https://github.com/vercel/next.js/assets/36726756/5b0f887b-abc2-424e-8253-71697842432e)
To be honest I was expecting more from next.js.

I have been working on it for the last 3 days - trying diffrent next.js versions, different node.js versions etc with no success.

The only thing I have noticed: for > 1000 images using html img instance of next/Image gives noticable gain in performace but still for this specific case I hit the wall with 10 requests.

Am I missing something? Is there something I can tweak in node or next.js?

Mayby next.js is not designed for large pages which cannot be served as SSG?

Any suggestions will help me a lot and save my day.

I have also used opentelemetry in my app, run in on localhost, when I call my page (no stress - test - just one request from my machine) the response time is about 200-400ms.

In JaegerUI I can`t see much: static endpoint response is < 5ms, there is quite a lot of time spent on render route (app).
![jaeger](https://github.com/vercel/next.js/assets/36726756/479a79ba-ba7f-446c-825b-224ecfd306b1)


### Current vs. Expected behavior

Am I missing something? Is there something I can tweak in node or next.js?

Mayby next.js is not designed for large pages which cannot be served as SSG?

Any suggestions will help me a lot and save my day.

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Pro
Binaries:
  Node: 20.9.0
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.0.4-canary.5
  eslint-config-next: 14.0.3
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.2.2
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Not sure

### Additional context

_No response_
Repository: excalidraw
Issue: Disappear laser pointer drawings only when the user stopped writing
Labels: enhancement

Laser pointer is a great edition. It enabled to quickly highlight things without disturbing the actual content. But, it disappears quite fast and is difficult to get focus to a point in the canvas. The problem is, even when the user is writing, it starts disappearing from the other end.

https://github.com/excalidraw/excalidraw/assets/186833/c6525a45-34c0-453d-9842-43f89907aa29

The way PPT or some other tools handle is, the laser writing stays as long as you are continuing to write. Once you stop, it waits for few seconds and then disappears.

https://github.com/excalidraw/excalidraw/assets/186833/80253ea8-415a-4f68-8c3e-7b1aaf4f43e0



It would be helpful if the laser pointer writing stays as long as the user is writing and disappear a few seconds after the user stopped writing.
Repository: godot
Issue: Unable to animate private property of node with @tool script.
Labels: bug,topic:editor,confirmed,usability,topic:animation

### Godot version

4.2 rc1

### System information

ubuntu 22.04

### Issue description

Minor issue with animating property of node with `@tool` script. Private (not exported) properties are available to choose in property track for nodes with `@tool` script and you can add it to the timeline. However there is no way to actually animate this track. When key is selected there is no value exposed to AnimationTrackKeyEdit. 

![key](https://github.com/godotengine/godot/assets/72736632/dd473a2e-f31b-46fc-9205-54f9de280ec9)

I assume that private properties either should not be displayed among the properties available for animation, or should be animated like other properties available in the editor.




### Steps to reproduce

- Open Node2D scene in MRP and select AnimationPlayer.
- Select Key of private property track. There is no value on it.
- Compare it to exported track's key, which is the same type. It has value and can be animated. 

### Minimal reproduction project

[Animate prop of tool script.zip](https://github.com/godotengine/godot/files/13416739/Animate.prop.of.tool.script.zip)
Repository: godot
Issue: Wrap mouse for blender-style transforms move axial error; special angles cannot be moved; unable to move in the vertical axis of the viewport models.
Labels: bug,topic:editor,confirmed,topic:3d

### Godot version

4.2 RC 1

### System information

windos 11 vlukan  RTX2060 ；i5-10400

### Issue description

When the mouse is away from the model and the perspective is almost perpendicular to the model, the model cannot be moved using g+z,Of course, when almost perpendicular to the model, you cannot use g+z to move the model. You must use the middle mouse button to rotate the viewport about 20 degrees to move the model's z-axis (provided the mouse is on the model)

### Steps to reproduce

(1) Press 1 to enter the front view.
(2) Press 5 to enter the perspective view.
(3) Press the f key to focus on the model
(4) Move the mouse to the right away from the model.
(4) Using G+Z to move the model.
------------------------------------------------------------
1.Press 1 to enter the front view.
2. Press 5 to enter the perspective view.
3. Rotate the viewport approximately 20 degrees with the middle mouse button
4. Move the mouse away from the model and press g+z to move the model







### Minimal reproduction project


[move.zip](https://github.com/godotengine/godot/files/13416862/move.zip)
Repository: pytorch
Issue: Inconsistency of state_dict loading across devices
Labels: module: nn,triaged

### 🚀 The feature, motivation and pitch

`model.load_state_dict(state_dict)` will fail implicitly when the state_dict and model is on different devices.

For example:

```
state_dict = torch.load("my_state_dict.pth", map_location="cuda:1")
model = model.to("cuda:0")
model.load_state_dict(state_dict)

<All keys matched successfully>
```
```
print(model.staet_dict())
OrderedDict([('conv1.0.weight', tensor([[[[ 1.0708e-...='cuda:0')), ('conv1.1.weight', tensor([ 9.9450,  1....='cuda:0')), ('conv1.1.bias', tensor([ 4.2752e+00,...='cuda:0')), ('conv1.1.running_mean', tensor([ 1.0614e-02,...='cuda:0')), ('conv1.1.running_var', tensor([4.9663e+01, ...='cuda:0')), ('conv1.1.num_batches_tracked', tensor(1819498, devi...='cuda:0')), ('conv1.3.weight', tensor([[[[-6.7733e-...='cuda:0')), ('conv1.4.weight', tensor([ 9.1376,  4....='cuda:0')), ('conv1.4.bias', tensor([  3.9776,   ...='cuda:0')), ('conv1.4.running_mean', tensor([  1.0833,   ...='cuda:0')), ('conv1.4.running_var', tensor([ 655.8754,  ...='cuda:0')), ('conv1.4.num_batches_tracked', tensor(1819498, devi...='cuda:0')), ('conv1.6.weight', tensor([[[[ 1.3530e-...='cuda:0')), ('bn1.weight', tensor([ 6.4884e+00,...='cuda:0')), ...])
```
```
print(state_dict)
OrderedDict([('conv1.0.weight', tensor([[[[ 3.0492e-...='cuda:1')), ('conv1.1.weight', tensor([ 9.1734,  1....='cuda:1')), ('conv1.1.bias', tensor([ 3.7334e+00,...='cuda:1')), ('conv1.1.running_mean', tensor([-3.8961e-01,...='cuda:1')), ('conv1.1.running_var', tensor([4.8182e+02, ...='cuda:1')), ('conv1.1.num_batches_tracked', tensor(1819928, devi...='cuda:1')), ('conv1.3.weight', tensor([[[[-1.9564e-...='cuda:1')), ('conv1.4.weight', tensor([ 8.1071,  3....='cuda:1')), ('conv1.4.bias', tensor([  3.7570,   ...='cuda:1')), ('conv1.4.running_mean', tensor([-39.9599,  3...='cuda:1')), ('conv1.4.running_var', tensor([1215.8009,  ...='cuda:1')), ('conv1.4.num_batches_tracked', tensor(1819928, devi...='cuda:1')), ('conv1.6.weight', tensor([[[[ 2.3606e-...='cuda:1')), ('bn1.weight', tensor([ 5.7912e+00,...='cuda:1')), ...])
```


### Alternatives

Add warning for such operation

### Additional context

```
torch.__version__
'2.0.1'
```

cc @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki
Repository: transformers
Issue: Extend Chat Template Tokenization for Training/Finetuning
Labels: Feature request

### Feature request

Extend `tokenizer.apply_chat_template` with functionality for training/finetuning, returning `attention_masks` and (optional) `labels` (for ignoring "System" and "User" messages during loss computation). 

I think this requires the following steps:
- Adding support for taking in a batch of conversations (e.g., `List[Conversation := List[Dict[str, str]]`)
- Invoking the native `tokenizer.__call__()` after applying the template to each example (passing through padding, truncation, any other parameters).
- **Important**: Adding an optional output for `labels` -- a "masked" version of the returned `input_ids` with tokens corresponding to the System/User roles set to be ignored for loss computation (e.g., set to `IGNORE_INDEX = -100`).

### Motivation

The new `tokenizer.apply_chat_template` feature is great, and resolves a lot of ambiguity when it comes to formatting inputs for chat-based LLMs. 

However, right now it's geared for inference-time usage, only taking a single "conversation" and outputting the `input_ids` (tokens) after applying the chat template.

When finetuning models on chat-based data, it would be really nice to unify the `apply_chat_template` API with the `tokenizer.__call__()` API, returning `attention_masks` and (optionally) `labels` (with "System" and "User" role text automatically ignored for loss computation).

### Your contribution

I can try building a proof-of-concept for a "standard" workflow and Draft PR; I think there'd need to be a few discussions about the actual implementation details though!
Repository: vscode
Issue: Configuration/Settings examples do not show in the settings view for extensions
Labels: feature-request,settings-editor

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->
When developping a VSCode extension, one may add configuration elements to their package.json. An `example` field allows to provide the user with examples:
```json
    "configuration": {
      "type": "object",
      "title": "BitBake",
      "properties": {
        "bitbake.commandWrapper": {
          "type": "string",
          "examples": [
            "docker run --rm -v ${workspaceFolder}:${workspaceFolder} crops/poky --workdir=${workspaceFolder} /bin/bash -c",
            "kas shell -c",
            "cqfd run",
            "${workspaceFolder}/build.sh --"
          ],
          "description": "A build tool command to wrap around BitBake commands.\n\nVarious tools provide ways to automatically configure the BitBake environment, or even call it inside containers. This option allows you to use them through this extension by wrapping around the bitbake invocation.\nThe resulting commands generated by this extension will be for example:\n $ commandWrapper 'bitbake core-image-minimal'\nOr, if pathToEnvScript and pathToBuildFolder are defined:\n $ commandWrapper '. pathToEnvScript pathToBuildFolder && bitbake core-image-minimal'\nSee examples."
        }
    }
```
These examples show as completion items when editing the `.vscode/settings.json` file:
![image](https://github.com/microsoft/vscode/assets/19970889/c98026d4-1afb-4c57-81f6-c8174b227744)

However, they will not show through the Settings Webview:
![image](https://github.com/microsoft/vscode/assets/19970889/dfed51e4-49a7-482d-b7c8-49fe1759bfa2)

It would be great if these examples could be displayed and suggested to the user through the Settings view. It's the most convenient way for users to configure an extension.
Repository: TypeScript
Issue: [js/ts] Feature request: In Quick Fix menu, show also a dynamic import variant
Labels: Suggestion,Help Wanted,Effort: Difficult,Experience Enhancement

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->

# Context 
In JS/TS file, when using an identifier which is not found in the file, but is found somewhere else in the repo (e.g. another open file, or somewhere else), VSCode will show a Quick Fix (cmd-.) suggestion to `import` the file.

<img width="619" alt="image" src="https://github.com/microsoft/vscode/assets/1437027/2ce78b99-14e0-4199-a549-4036c440bb66">

When followed, this will add a _top-level static `import`_

```ts
import { FOO_BAR } from 'web-ui/foobar';
```

# Feature request

It would be useful for Quick Fix menu **to also have a variant of a suggestion which would add a _local, dynamic `import()`_**, which would be inserted just above the line where the identifier is first used:

So the menu would be like:

- Quick Fix
  - Add import from "web-ui/foobar"
  - **Add dynamic import from "web-ui/foobar"**

And the code would look like:

```ts
        if (doSomething) {
            const { FOO_BAR } = await import('web-ui/foobar'); 
            // or, depending on how the export is defined:
            // const { FOO_BAR } = (await import('web-ui/foobar')).default;
            const value = FOO_BAR;
```

# Potential drawbacks

- If for every static import suggested, there's an equivalent dynamic import, the Quick Fix list may grow substantially, especially if `FOO_BAR` identifier is present in many files.

# Open questions

- To be decided if the dynamic import suggestion would show up:
  - everywhere
  - or only in functions?
  - or only in functions and `if` blocks? etc.

- If a dynamic import is added in a function, should the function be converted to `async` function automatically?

- Perhaps the dynamic import variant could be behind a flag (enabled by default for discoverability; easy to disable if someone doesn't like it, and prefers to only have static imports in the quick fix)

# Extra considerations

There might be already existing dynamic imports that could be amended. For example, say the code is:

```ts
        if (doSomething) {
            const { QUUX } = await import('web-ui/foobar'); 
            const value = FOO_BAR;
```

In that case, all dynamic imports in scope should be analyzed, and the editor should suggest to update the existing

```ts
const { QUUX } = await import('web-ui/foobar');
```

with `const { FOO_BAR, QUUX } = ...`.
Repository: rust
Issue: Building 1.74.0 natively on NetBSD/powerpc results in "pattern `Some(_)` not covered" error message
Labels: A-LLVM,P-high,T-compiler,O-netbsd,O-PowerPC,C-bug

While trying to build 1.74.0 natively on NetBSD/powerpc 10.0_BETA, I appear to be unable to cross this problem by myself.  It doesn't look like the `armv7` or `aarch64` NetBSD targets are similarly affected, so this is probably more a powerpc issue than a NetBSD issue.

```
     Running `/usr/pkgsrc/wip/rust174/work/rust-bootstrap/bin/rustc --crate-name build_script_main --edition=2018 /usr/pkgsrc/wip/rust174/work/rustc-1.74.0-src/vendor/typenum-1.15.0/build/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C metadata=ef76ccfc9e00eb4a -C extra-filename=-ef76ccfc9e00eb4a --out-dir /usr/pkgsrc/wip/rust174/work/rustc-1.74.0-src/build/bootstrap/debug/build/typenum-ef76ccfc9e00eb4a -L dependency=/usr/pkgsrc/wip/rust174/work/rustc-1.74.0-src/build/bootstrap/debug/deps --cap-lints allow -Wrust_2018_idioms -Wunused_lifetimes -Dwarnings`
error[E0004]: non-exhaustive patterns: `Some(_)` not covered
   --> /usr/pkgsrc/wip/rust174/work/rustc-1.74.0-src/vendor/version_check/src/lib.rs:290:11
    |
290 |     match is_feature_flaggable() {
    |           ^^^^^^^^^^^^^^^^^^^^^^ pattern `Some(_)` not covered
    |
note: `Option<bool>` defined here
   --> /usr/pkgsrc/wip/rust/work/rustc-1.73.0-src/library/core/src/option.rs:571:5
    |
563 | pub enum Option<T> {
    | ------------------
...
571 |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
    |     ^^^^ not covered
    = note: the matched value is of type `Option<bool>`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
293 ~         None => return None,
294 ~         Some(_) => todo!(),
    |

For more information about this error, try `rustc --explain E0004`.
error: could not compile `version_check` (lib) due to previous error
```

Once again I solicit assistance about how to cross this hurdle.
And ... why does this happen just for this target?
At least this hurdle appears to be consistent / reproducible...
Repository: godot
Issue: set_length of GrooveJoint2D doesn't change its length
Labels: bug,confirmed,topic:physics,topic:2d

### Godot version

v4.1.3.stable.official [f06b6836a]

### System information

Apple Ventura 13.5, Forward+

### Issue description

## Setting the `length` of a `GrooveJoint2D` doesn't work. The simulated length doesn't actually get updated. It keeps the initially set length.

---

## My guess
It seems the joint's parameters [are not actually changed](https://github.com/godotengine/godot/blob/ac29e8e3fed8a8c8d74a267a60eee75b979bb994/scene/2d/joint_2d.cpp#L436), unlike in e.g. [PinJoint2D::set_softness](https://github.com/godotengine/godot/blob/ac29e8e3fed8a8c8d74a267a60eee75b979bb994/scene/2d/joint_2d.cpp#L294).

[There is](https://github.com/godotengine/godot/blob/master/servers/physics_2d/godot_physics_server_2d.cpp) a `pin_joint_set_param` and a `damped_spring_joint_set_param`, but no `groove_joint_set_param`. If I can find the time I will try to add this function and integrate it into `GrooveJoint2D::set_length`.

## Test setup:
- The left rigid body is connected to a groove joint with a length of 200px ...
- ... and the right one to a groove joint with the length of 50px **but** a script sets the length also to 200px

```
func _ready():
	$Right/GrooveJoint.set_length(200)
```

<img width="995" alt="Screenshot 2023-11-20 at 17 50 44" src="https://github.com/godotengine/godot/assets/7897006/9bfacba9-d4c2-4410-83ae-37364dfd8e38">

### Expected result
Both rigid bodies should behave the exact same.

### Result
The visualisation of the right groove joint is updated correctly (yellow line), but it doesn't fall lower than the initially specified 50px.

<img width="688" alt="Screenshot 2023-11-20 at 17 58 00" src="https://github.com/godotengine/godot/assets/7897006/ad3910ec-053e-47c6-a6b5-73b4ebe5aa97">

---

PS: I seem to become the guy that opens all the 2D physics bugs 😅 

### Steps to reproduce

1. Create a `GrooveJoint2D` connected to two bodies
2. Create a script that changes the `length` of the GrooveJoint (neither `length` nor `set_length` does work)
3. Watch the simulation play

### Minimal reproduction project

[groove-joint-bug.zip](https://github.com/godotengine/godot/files/13417593/groove-joint-bug.zip)
Repository: godot
Issue: Vulkan Mobile: LightmapGI sampling is not disabled on lights with Static bake mode, causing double lighting to appear
Labels: bug,topic:rendering,confirmed,topic:3d

### Godot version

4.2.beta1 (first version to be able to sample lightmaps correctly with Mobile), 4.2.rc1

### System information

Fedora 38, GeForce RTX 4090 (NVIDIA 535.129.03)

### Issue description

LightmapGI sampling is not disabled on lightmapped meshes with Static bake mode, causing double lighting to appear:

Forward+ | Mobile
-|-
![Screenshot_20231120_175447](https://github.com/godotengine/godot/assets/180032/fc4c2c79-fa9e-4d42-ba2a-d1b6ebf71ada) | ![Screenshot_20231120_175831](https://github.com/godotengine/godot/assets/180032/3d62d218-6d82-4a64-b04e-30deecfc807c)

The dynamic object rendering issue is tracked in https://github.com/godotengine/godot/issues/84846.

### Steps to reproduce

- Create meshes with Static bake mode that have UV2 (you can use **Add UV2** in PrimitiveMesh for this).
- Add some lights, enable shadows on them and set their bake mode to **Static**.
- Bake lightmaps and look at the scene's appearance.
- Switch to the Mobile rendering method and compare visuals.

### Minimal reproduction project

[test_lightmapgi_mobile.zip](https://github.com/godotengine/godot/files/13417782/test_lightmapgi_mobile.zip)
Repository: flutter
Issue: Ensure Flutter SDK stable releases ship with the same versions packages from the Dart SDK as Dart
Labels: c: proposal,fyi-release,team-tool

I don't know what the solution to this is, but I think it's worth starting a discussion to see if there's a way to improve things.

Currently there are some packages inside the Dart SDK repository that ship both with Dart and are also published to pub and used by Flutter - for example DDS and DWDS.

Today, the version of these components inside the Dart SDK and the Flutter SDK can be different versions if changes are made in the Dart SDK, but they are not released to pub and rolled into Flutter. For example the recent DAP bug (https://github.com/dart-lang/sdk/issues/54087) is an issue in the latest Flutter SDK but only for Flutter projects (which use `flutter debug_adapter`) and not for Dart projects (which use `dart debug_adapter`) from the same SDK version.

To avoid this, we need to ensure when a release is being made that any local packages in the SDK have been published to Pub and rolled into Flutter. Doing this manually is error prone - especially as Pub releases aren't pushed on every change (because that would be a big overhead).

One possible improvement would be to have a script that checks (when preparing a Flutter release) that the version in the `pubspec.yaml` for a package that lives in the Dart SDK repository matches the one in Flutter's pubspec.yaml (we could also check against Pub, but if Dart+Flutter match it's certain the package was published to Pub).

This would rely on the version being bumped in pubspec.yaml in the package in the SDK with changes, but I suspect that's something much less likely to be wrong than forgetting to do a Pub release prior to a branch.

@devoncarew @jacob314